10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Folks,
I am looking for a bash script which check the ftp server connection status and transfer success/failure also final stage is like if the transfer/connection failed, i should get an email.
First stage - checking for login success or not
#!/bin/bash
HOST='your.ftp.site'... (3 Replies)
Discussion started by: Thala
3 Replies
2. Shell Programming and Scripting
Let's say I have a text file called process.out that contains:
cn=long\, ann,cn=users
cn=doe\, john,cn=users
I need to have the following appended in the beginning
ldapdelete -h $OIDHOST
So the final output looks like:
ldapdelete -h $OIDHOST "cn=long\, ann,cn=users"
ldapdelete -h... (4 Replies)
Discussion started by: exm
4 Replies
3. UNIX for Advanced & Expert Users
Why does this work when grepping for a backslash?
grep '\\' .bash_history
grep "" .bash_historyWhy does this not work when grepping for a backslash?
grep "\\" .bash_historyI know this works works but just don't understand why I need 4 backslashes when using double quotes.
grep "\\\\"... (7 Replies)
Discussion started by: cokedude
7 Replies
4. UNIX for Dummies Questions & Answers
Hi I am getting absurd behavior of escape character in echos as followed:oinlcso003{arsadm} #: echo "\as shdd"
\as shdd
oinlcso003{arsadm} #: echo "Well, isn't that \"special\"?"
Well, isn't that "special"?
oinlcso003{arsadm} #: echo "Well, isn't that \special\?"
Well, isn't that \special\?... (3 Replies)
Discussion started by: nixhead
3 Replies
5. Shell Programming and Scripting
If I echo "\\" I get a backslash returned
~$ echo "\\"
\
Why doesn't this work:
string=`echo "\\"`
echo $string
I get the error message:
bash: command substitution: line 1: unexpected EOF while looking for matching `"'
bash: command substitution: line 2: syntax error: unexpected end... (2 Replies)
Discussion started by: locoroco
2 Replies
6. UNIX for Dummies Questions & Answers
Hello all. I am going to try my hand at compiling tarballs rather than installing packages.
I have a pretty good understanding of the process and have even compiled/installed Top from source.
But that was an easy install, I want to try something more complex using the various configure... (6 Replies)
Discussion started by: RobertSubnet
6 Replies
7. Shell Programming and Scripting
I have a line that contains backslashes in which I want sed to substitute text with variables.
The line;
\\s008\2033330user$
I want to change this in \\s008.ourschool.com\2033330user$
I now use this script:
USER=2033330user
sed 's/\\'"$USER"'/.ourschool.com\\'"$USER/"
This doesn't... (3 Replies)
Discussion started by: Tubbie
3 Replies
8. Shell Programming and Scripting
Hi
I need the "\\hello" (without double quotes) to be written to a file.
echo "\\\\hello" >file is working under bash shell but not working under ksh shell (gives only one / in the output)
Please advise.
TIA
Prvn (4 Replies)
Discussion started by: prvnrk
4 Replies
9. UNIX for Dummies Questions & Answers
I have a variable containt something like this, c:\mask\mask. How can I escape "\" in the values? I want the value as it it. (9 Replies)
Discussion started by: swmk
9 Replies
10. UNIX for Dummies Questions & Answers
When I run my script in debug mode I see that \ is not getting executed as part of command. It is being treated as escape character.
find ${DATABASE_PARAM_PATH} -mtime +${RETENTION_PERIOD} -exec rm -rf {} \;
Command execution output in debug mode :
find... (1 Reply)
Discussion started by: findprakash
1 Replies