Thanks for all the replies and suggestions.
WD |
The advanced bash scripting guide is a good online resource:
http://www.tldp.org/LDP/abs/html/index.html If you need something a little more basic try the Bash Guide for Beginners: http://www.tldp.org/LDP/Bash-Beginne...tml/index.html |
JLM-TOC,
2) the history exansion problem you describe is real, but is only concerning interactive shells. Shell scripts shouldn't be affected. |
[bash] new to bash, having problems debugging.
oops posted in wrong place.
|
Quote:
So you'll have: FILES=/usr/local/rpm\ /etc/samba /etc/httpd :) Sorry for my bad english :S |
Just to warn everyone, this is 9 year old necro-thread.
In the future, please consider whether what you want to add is important enough to justify re-opening a long-dead thread. Thanks. While I'm here, I'm going to add my own comment though, and say that lists of filenames should not be stored in a single variable anyway. Always use arrays when you have multiple related strings to operate on. Code:
files=( /usr/local/rpm /etc/samba /etc/httpd ) |
I also have a similar question about 'fi'
INSTDIR=/home/wdy/Download
if [ -d $(INSTDIR) ];\ then\ cp myapp $(INSTDIR);\ chmod a+x $(INSTDIR)/myapp;\ chmod og-w $(INSTDIR)/myapp;\ echo "Installed in $(INSTDIR)";\ else\ echo "sorry,$(INSTDIR) does not exist";\ fi run it and the error:syntax error near unexpected token 'fi' but why? ican not find the reason. |
All times are GMT -5. The time now is 07:07 PM. |