[SATLUG] BASH script not writing to file

Bruce Dubbs bruce.dubbs at gmail.com
Wed Mar 28 13:15:43 CDT 2012


John Champion wrote:
> 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.

I was trying to see if your file system was mounted read only.   You are 
probably using systemd which really fouls up some simple commands.

Try `mount|grep -v cgroup`

Also, as Henry pointed out, try removing directories from the output file:

#!/bin/bash
read -p "What's your name" fname
echo -e "You typed in $fname" > test.txt


   -- Bruce


More information about the SATLUG mailing list