Results 1 to 5 of 5
Hello!
I need some help with an echo statement. I am using "read variablenamehere" to get user input in an installer. That part works fine. I need to write that ...
- 05-20-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 8
Echo Assistance Needed
Hello!
I need some help with an echo statement. I am using "read variablenamehere" to get user input in an installer. That part works fine. I need to write that to a file, though. This is the code I have now:
(I was trying to post code here, but it picks up part of it as a URL. SeeSorry for the spaces, I can't post URLs yet)Code:pastebin .com/ 8TmS3wG5
Everything works great except for all of the variables on the left ($username, $password, etc) are not sent to the file. Rather they are parsed as variables and send blank text i.e. nothingness. How can I get echo to not parse the variables on the left, but parse the ones on the right?
Thanks for your help!
Ross
- 05-20-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Hi,
Try escaping the dollar sign with a backslash, to prevent the shell (bash, etc.) from interpreting it for you, e.g.:
Code:echo "\$username = 'gvsms'; " >> config.inc.php
- 05-20-2011 #3Just Joined!
- Join Date
- May 2011
- Posts
- 8
- 05-20-2011 #4Just Joined!
- Join Date
- May 2011
- Posts
- 8
- 05-20-2011 #5Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
cheers!!!!


Reply With Quote
