10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
is there a more efficient way to write the following code:
for eachlfile in $(ls -ltcrd ${BACKUPDIR}/${BACKUPNAME}*/content_${BACKUPNAME}* 2>/dev/null | awk '{print $NF}')
do
echo "=========================="
... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. Shell Programming and Scripting
hi
i want to scp files from remote server B to my local server A...
and i have a file containing list of all files to be scped from remote server B
there is a passwordless connectivity set between remote server and my local server.
need a ksh script.. with a for loop that goes through... (2 Replies)
Discussion started by: billpeter3010
2 Replies
3. UNIX for Dummies Questions & Answers
I need to load an XML file and loop through a list of nodes in it to execute a shell script for each one using the attributes for each node as parameters for the script. Any ideas? Any help will be much appreciated. (1 Reply)
Discussion started by: bradlecat
1 Replies
4. Shell Programming and Scripting
Hey all,,
I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use.
lets say i have a list..
set arr=(x y z e f)
I wanna iterate the list with foreach ,, not with while.!!
foreach i $arr
echo $i
end
does not work (2 Replies)
Discussion started by: eawedat
2 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I need to run a command for a set of input variables that are present in a tab delimited file, a sample of which is shown below:
1 3749
1 4129
1 5980
2 6201
2 9925
2 6894
3 1338
3 6477
3 6242
3 3632
Every row represents the two input values... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
6. Shell Programming and Scripting
Hi,
I want to display list of last 10 backup files (with numbering) from the temporary file
c:/tmp/tmp_list_bkp.txt
Example :
1) backup_file1
2) backup_file2
3) backup_file3
........
........
I tried as below but not working.
for file in c:/tmp/tmp_list_bkp.txt
do
echo... (3 Replies)
Discussion started by: milink
3 Replies
7. AIX
Hi,
I have the current script with the following code and it works ok.
for i in `find . -name "???ABCEDFGH*"`
do
SESS_NO=`echo $i | awk -F "." '{print $3}'`
rm -f $LOGDIR/${OT_QUEUEID}*${SESS_NO}.log 2>/dev/null
rm -f $i 2>/dev/null
done
I want to remove the usage of the... (2 Replies)
Discussion started by: jerardfjay
2 Replies
8. UNIX for Dummies Questions & Answers
I want to store a set of string values in a 1-D array
and then iterate the list by using a loop.
Please help this dummy:) (1 Reply)
Discussion started by: ngagemaniac
1 Replies
9. Shell Programming and Scripting
Can I use a file as the list in a for loop? I tried it like this:
workstation=( $(cat /home/me/file) )
for ws in $workstation
do
command
done
The contents of file are like:
abc
def
ghi
It only read the initial line.
Does each item have to be quoted? Do they have to all be... (11 Replies)
Discussion started by: earnstaf
11 Replies
10. Shell Programming and Scripting
is it possible to run a while loop by comparing a variable with a list ?
taglist="<html> </html> <head> </head> <body> </body> <p> </p> <ul> </ul> <li> </li> <em> </em> <title> </title>"
read newtag
while ]
do
echo "Entry is not in list, please try again'
read newtag
done... (6 Replies)
Discussion started by: forever_49ers
6 Replies