[SATLUG] BASH script not writing to file

John Champion satlugacct at jchampion.com
Wed Mar 28 12:51:13 CDT 2012


pwd= /root/Documents
whoami = root
ls -ld = drwxr-xr-x 23 root root 380 2012-03-28 12:35
the mount portion is rather lengthy. that's due to the multiple
USB/external storage devices plus the SANs I am connected to.


thanks
john



On Wed, Mar 28, 2012 at 11:53 AM, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:

> John Champion wrote:
>
>> Hi,
>>
>> I've tried several things with a very basic BASH script to try to figure
>> out what is going on and I cannot make heads or tails out of it.
>>
>> Here's the script:
>>
>> #!/bin/bash
>> read -p "What's your name" fname
>> echo -e "You typed in $fname" > ./Documents/test.txt
>>
>> This works fine in a pure Linux install. This does not work in the VM. It
>> is simply not writing to the file. I cannot get stderr to write to a file
>> either.
>>
>> It's as if the VM is locked even though I'm running this as root (did this
>> to see if that made a difference and it didn't).
>>
>
> What is the output of `mount`?  `ls -ld .`?  `pwd`?  `whoami`?
>
>  -- Bruce
>
> --
> ______________________________**_________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/**mailman/listinfo/satlug<http://alamo.satlug.org/mailman/listinfo/satlug>to manage/unsubscribe
> Powered by Rackspace (www.rackspace.com)
>


More information about the SATLUG mailing list