10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to send the file list as parameter to another job and execute it.
But the loop doesn't work, the inner job is running only once and not twice as expected
for filelist in $(ls -rt *.txt | tail -2)
do
echo $filelist
export filelist
cmd="$Program -config $configfile -autoexec... (11 Replies)
Discussion started by: asandy1234
11 Replies
2. Shell Programming and Scripting
Hi,
Below is my script in which i am using nested while loop to read two files and move the files to a remote server.
My issue is that the 2nd while loop doesn't stop executing and it keeps on executing.
Can someone please let me know where i have gone wrong.
myFile=$ESER_TEST_FILES
... (2 Replies)
Discussion started by: funonnet
2 Replies
3. Shell Programming and Scripting
cat vfiler_volumes.list | while read var1 var2 ; do ssh -n "$var1" df -h "$var2" >> test
this part works, however i would like to add an echo $var1 >> test before each ssh iteration.
any pointers ?
thanx (1 Reply)
Discussion started by: riegersteve
1 Replies
4. Shell Programming and Scripting
I have a script that only works if I remove it from the looping scenario.
#!/bin/bash
# Set the field seperator to a newline
##IFS="
##"
# Loop through the file
##for line in `cat nlist.txt`;do
# put the line into a variable.
##dbuser=$line
echo "copying plugin..."
... (6 Replies)
Discussion started by: bugeye
6 Replies
5. Shell Programming and Scripting
Hi,
I'm using a for loop reading from an input file that contains files, whose path includes a variable name.
But the for loop doesn't expand the variable and therefore can't find the file.
Here's an example:
File BACKUPFILES
/home/John/alpha
/home/Sue/beta... (8 Replies)
Discussion started by: Hesiod
8 Replies
6. Shell Programming and Scripting
Hi all,
I need some help. my shell script doesn't work especially in the loop.
#!/bin/sh -xv
export ORA_ADMIN=/oracle/home/admin
export ORACLE_SID=ORA_SID
cat ${ORA_ADMIN}/param_alert_log.ora | while read MSG
do
#echo $MSG
#echo "tail -400... (8 Replies)
Discussion started by: sidobre
8 Replies
7. Shell Programming and Scripting
I have a script which uses below for loop:
for (( i = 0 ; i <= 5; i++ ))
do
echo "Welcome $i times"
done
But when I run the script, it gives error message:
Syntex Error : Bad for loop variable
Can anyone guide to run it?
Thanks in advance. (10 Replies)
Discussion started by: naw_deepak
10 Replies
8. UNIX for Dummies Questions & Answers
I've been referring bash info for processes and came across a structure for a process which is defined like
typedef struct process
{
struct process *next;
char ** argv
.
.
.
}process;
What I don't understand is that in the program there's a for loop which goes like this
job... (2 Replies)
Discussion started by: sdsd
2 Replies
9. Shell Programming and Scripting
Hi -
Trying to take a list of ldap suffixes in a file, run an ldapsearch command on them, then run a grep command to see if it's a match, if not, then flag that and send an email alert.
The list file (ldaplist) would look like -
***********
o=company a
o=company b
***********
**... (7 Replies)
Discussion started by: littlefrog
7 Replies
10. UNIX for Dummies Questions & Answers
I have written a script to run on UNIX server. When I tested, it always hanged on after "date +"%D %T: XXXXXX script started." part. Then it wouldn't go further. UNIX server gave me one error message. I used the same code in another script. It works fine. I think the major problem may be in... (3 Replies)
Discussion started by: duke0001
3 Replies