01-07-2015
thank you for your reply. either way is fine for me. whichever has code easier to understand for beginners is fine for me. Since each command will take similar time, so waiting all 20 command are done, then start next 20 commands is fine for me.
thank you for your time and help!
Lin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
how would i go about making a loop which gets each line from a single text file, set it to a variable and then print it to screen?
thanks
eg:
#!/bin/sh
FILE="somefile.txt"
text_line=""
what kind of loop would use here? (18 Replies)
Discussion started by: strike
18 Replies
2. Shell Programming and Scripting
while
do
print What is the next device number to be added to $dgroup?
print Press \<Enter\> if there are no more devices to be added.
read dev_num
export dev_num
symld -g $dgroup -sid $sname add dev $dev_num
done
In this while... (2 Replies)
Discussion started by: stepnkev
2 Replies
3. Shell Programming and Scripting
Hi, I am writing a bash shell script. I will have a section of code devoted to a for loop:
for FILE in *.hdf *.L2; do
echo hello world
done
The complication is that sometimes there will not be any files with a ".hdf" extension, or sometimes there won't be any with a ".L2" extension. Since... (4 Replies)
Discussion started by: msb65
4 Replies
4. Shell Programming and Scripting
HI ALL
How to read first 10 line from a file using any method (5 Replies)
Discussion started by: aliahsan81
5 Replies
5. Shell Programming and Scripting
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies
6. Shell Programming and Scripting
I am struggling with the for loop. I have a file name heros.txt and I would like to go through a list in file where.txt and see if I can find the name from where inside heros.
One of the problems that I am having is I dont understand how to setup the for loop to find the list to search.:wall:
... (6 Replies)
Discussion started by: captaindoogles
6 Replies
7. Shell Programming and Scripting
Hi,
I have a requirement where I have to check for 10 files in Unix location. If all of the files present in that directory then i have execute another process.
can you help me resolving this issue.
sample
location
/home/usr
abc.txt
cde.txt
aaaa.txt
lll.txt
ooo.txt
if all the... (3 Replies)
Discussion started by: manasvi24
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I would really appreciate some help with manipulating a file.
Here is my input file:
SNP_1 : 1 SNP_11 : 1
SNP_2 -0.12 1 SNP_12 -0.3472 1
SNP_3 -0.708 1 SNP_13 0.5037 1
SNP_4 1.492 0.5 SNP_14 -0.0685 1
SNP_5 1.27 0.5 SNP_15 0.547 ... (3 Replies)
Discussion started by: zajtat
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have code like below
disk_list=$(ls /root/file1)
for disk in $disk_list
do
pvcreate $i
done
I know what pvcreate command does, but I do not understand what this $i do here. can someone please explain. (2 Replies)
Discussion started by: stew
2 Replies
10. Shell Programming and Scripting
Hi I have script
if ; then
echo "Found Node"
else
echo "Sorry this is not a node"
I need to add conditions "nn" ,"rm", and "hh" in the same line along with "hd" .Can this be done or do I need to use elif (1 Reply)
Discussion started by: Dublin4320
1 Replies