12

how do i prevent $ from being commented out if no value is present? (Bash Script)

view full story
linux-howto

http://www.unix.com – Hey guys, I want to paste a code in a .php file via a bash script. I am on ubuntu 10.04. The problem is if the values for $ aren't present, then all of them would be removed by the script. An example of my script (I modified it for this thread to prevent it from being overly complicated) Code: #!/bin/bash # Script to add a user to Linux system echo "Please enter RPCnumber" read RPCNumber echo "Please enter SCGIuserport" read SCGIuserport echo "please enter username" read username cat >/var/www/rutorrent/conf/users/$username/config.p (HowTos)