10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am trying to read a list of hosts from a config file and trying to get file list from that host. For this I have used one while loop.
cat "$ARCHIVE_CFG_FILE" | sed '/^$/d' | sed '/^#/d' | while read ARCHIVE_CFG
do
SOURCE_SERVER_NAME=`echo "$ARCHIVE_CFG" | awk -F '|' '{ print... (2 Replies)
Discussion started by: Anupam_Halder
2 Replies
2. Shell Programming and Scripting
Here's my code -
for File in "${Files}"; do
uuencode "${File}" "$(basename ${File} 2>&-)" 2>&-;
done | mailx -s "subject" "a@b.c"
Now I want to know if there a way to *not* send an email if the "Files" variables turns out to be blank. Any suggestions?
Also, just to clarify, I... (4 Replies)
Discussion started by: nexional
4 Replies
3. Shell Programming and Scripting
hi All,
cat login.list
server1 userid1
server2 userid2
server3 userid3
----------------------------------------
#SSHSCRIPT.ksh
FILE=login.list
while read vah vah_id
do
ssh $vah -l $vah_id "pwd"
done < "$FILE"
-----------------------------------------
When i... (2 Replies)
Discussion started by: raghur77
2 Replies
4. Shell Programming and Scripting
Dear Friends,
Here I need your guidance once again.
I have for loop which check all files in a folder for a particular string. If the string is found in a file it returns value other than 0 else returns 0 value in variable t2.
At times the string which we are looking for is in first file... (1 Reply)
Discussion started by: anushree.a
1 Replies
5. Shell Programming and Scripting
I have a main script with while loop having for loop inside. Again in for loop based on if condition few functions will be called. So when a function is called for certain condition it should come out from the main for loop and should continue with while loop.
Let me explain with example here:
I... (6 Replies)
Discussion started by: vpv0002
6 Replies
6. Shell Programming and Scripting
Hi,
I have a file that looks like this - lets call it fileA
>hhm2
IIIIIIIIILLLLLLLMMMMMMMMMNNNNNNNNNNGGGGGGHHHHHHHH
>hhm4
OOOOOKKKKKKKKMMMMMHHHHHLLLLLLLLWWWWWWWWWWW
>hhm9
OOOOOOOIIIIIIIIIKKKKKKKKKMMMMMHHHHHHHHHHHLLLLLLLLLL
So the file is pretty straight forward. The name is indicated... (2 Replies)
Discussion started by: phil_heath
2 Replies
7. Shell Programming and Scripting
Hello Friends,
Im trying to write a script to invoke nagios. In order to do this I grep some words that comes from output of some backup scripts. When there is "End-of-tape detected" in directed output logs it should give alarm. First I would like to know if there is any better way to write... (5 Replies)
Discussion started by: EAGL€
5 Replies
8. Shell Programming and Scripting
Hi friends,
I have 2 scripts. 1) Master_Script.sh and 2) Sub_script.sh
We run Master_script.sh manually where as sub_script.sh keeps generating output in every 2 minutes (through crontab). The output generated by sub_script.sh can be 0 or 1.
As I told you, sub-script.sh keeps generating o/p... (7 Replies)
Discussion started by: anushree.a
7 Replies
9. Shell Programming and Scripting
Hey all
I have two scripts, one script containing the guts of my code.
The other simply loops through a list, calling the other script on each iteration.
Problem is when I add the line
`/usr/bin/rsh -l root $HOSTNAME ""`
to my main script, the loop never seems to exectute any more... (1 Reply)
Discussion started by: mark007
1 Replies
10. HP-UX
Can some one point this UNIX newbie to a web site or directions on the steps needed to break a mirror in HP-UNIX to change a bad hard drive. (4 Replies)
Discussion started by: egress1
4 Replies