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
The below while loop is in ksh on a SunOs server: SPARC-Enterprise 5.10
The ksh version is: Version M-11/16/88i
The intention of the below while loop is to read through a list of file names in files.txt and
delete each file from a server, one at a time. The delete works, the problem is that if... (6 Replies)
Discussion started by: LES2013
6 Replies
3. Shell Programming and Scripting
All,
Here is my for loop
export CFGLIST="LIST1 LIST2 LIST3"
for i in $CFGLIST
do
echo print $i
done
The output will be
LIST1
LIST2
LIST3
But i want it display
LIST3
LIST2
LIST1 (8 Replies)
Discussion started by: baluchen
8 Replies
4. AIX
Hi,
I am building a script to grep for a string in all the files from a folder and display the results.
I am reading the files one by one by placing the names in other file using while loop
my code is as below
while read inp
do
chk=`grep -c "$str" $pth/$inp`
... (2 Replies)
Discussion started by: sekhar gajjala
2 Replies
5. 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
6. 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
7. 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
8. 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
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. UNIX for Dummies Questions & Answers
I am not able to read inside a while though i get the message "inside read" the cursor doesnt prompt from the console
cat file | while read ln_new_engine_dirs
do
echo "inside $ln_new_engine_dirs"
if
then
read nn
echo "inside read"
fi
done
Thanks in advance (3 Replies)
Discussion started by: ssuresh1999
3 Replies