10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Team,
i have to read line by line in a while loop, and the input file has:.
# The script will start cppunit test application to run unit tests.
-LD_LIBRARY_PATH=$CPPUNIT_HOME/lib:\
+LD_LIBRARY_PATH=$VOBTAG/SS_UnitTest/lib:\
$VOBTAG/SS_BFD/BFDSCLI/build:\
... (7 Replies)
Discussion started by: chandana hs
7 Replies
2. Shell Programming and Scripting
Good morning!!
Im trying to ge tthe output in this for loop to be reversed.
#!/usr/bin/perl
$i = 1;
for($i != 0 ; $i < 11 ; $i++){
print "$i\n";
}
Ive tried changing the i++ to i--, but it makes the outputted numbers different also.
Thanks
bigben (4 Replies)
Discussion started by: bigben1220
4 Replies
3. Shell Programming and Scripting
Is there a means of reading files in reverse? I just want to be able to read a file from the beginning and once I read a particular line, I start reading lines backward from there.
Now, I could toss everything into a string array, but the file I'll be reading is roughly 100MB. I don't want... (3 Replies)
Discussion started by: mrwatkin
3 Replies
4. UNIX for Dummies Questions & Answers
Hi I am trying read in side a do statement
but it is not working it is just printing abc before read but not stopping in abc for user input
Can anybody please help
#!/usr/bin/ksh
cat sample_file | while read ln_source3
do
param=`echo $ln_source3 | nawk... (1 Reply)
Discussion started by: ssuresh1999
1 Replies
5. Shell Programming and Scripting
Hi,
I am trying to create a while loop that will do the following:
INFILE= list of new records that need to be added after last previous record
while read record
do
find the last record processed
create list of new records output to a file
echo "$record">> $NEWFILE
done
... (9 Replies)
Discussion started by: shortyball24
9 Replies
6. Shell Programming and Scripting
hi all,
i have a while loop which i am using to read lines into an array:
k=0
exec 10<file
while read LINE <&10; do
ARRAY=$LINE
((k++))
done
exec 10>&-
echo ${ARRAY}
for some reason when i display the array it is not showing the last row in the file.
any help appreciated. (1 Reply)
Discussion started by: npatwardhan
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file (details.txt) with 3 rows of variables ie...
name postcode age
john D fr25dd 25
mark W ab122aa 22
phil C cd343bb 33
What I want to do is read down the list with a loop and add each field into a one line piece of text...
So I have a file (test1) which reads;... (3 Replies)
Discussion started by: starsky
3 Replies
8. Shell Programming and Scripting
hi
i have two files
cat input.txt
123456| 43256
456482|5893242
cat data.txt
xv 123456 abcd dsk
sd 123456 afsfn dd
df 43256 asdf ff
ss 456482 aa
sf 5893242 ff ff
aa 5893242 aa aa
i need to read inputs from input.txt and find data for data.txt.
then i need to print them as a... (2 Replies)
Discussion started by: windows
2 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have something like
cat $HOME/all_dirs | while read ln_old_dirs
do
if
then
echo "$ln_all_old_dirs"
fi
done
As you know that the variable ln_all_old_dirs is not accessable from outside the... (2 Replies)
Discussion started by: ssuresh1999
2 Replies
10. Shell Programming and Scripting
i have a teat file having data like
one 12/3
two 23/09
three 12/12
now from another script i want to read one line at a time ,cut field one and two in two separate variable ,compare field1 with another variable
but outside the loop .If i found a match i want to take from user the value... (2 Replies)
Discussion started by: mobydick
2 Replies