10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've tried numerous commands, but I am not sure how to use sed in a loop. This is what I have:
VARZ contains CARD_FILE_LIST and it also contains CARD_FILE_LIST2
so
echo "$VARZ"
CARD_FILE_LIST
CARD_FILE_LIST2
I have a file with 60 lines in /tmp/testfile it and I want those lines deleted... (3 Replies)
Discussion started by: newbie2010
3 Replies
2. Shell Programming and Scripting
Good Afternoon,
I start with a file named biglist.txt.
I have another file smallerlist. txt
I want to remove the lines from smallerlist.txt from biglist.txt and leave those lines that do not reside in smallerlist.txt.
Thanks !! (2 Replies)
Discussion started by: popeye
2 Replies
3. Shell Programming and Scripting
Hi,
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Discussion started by: ketanraut
2 Replies
4. Shell Programming and Scripting
Dear all,
I have a file like this:
imput
scaffold_0 1
scaffold_0 10000
scaffold_0 20000
scaffold_0 25000
scaffold_1 1
scaffold_1 10000
scaffold_1 20000
scaffold_1 23283
and I want the output like this:
scaffold_0 1 scaffold_0 10000
scaffold_0 10000 scaffold_0 20000... (6 Replies)
Discussion started by: valente
6 Replies
5. UNIX for Dummies Questions & Answers
Hi Dears,
I use the below code to analyze lines in a file:
for line in `cat ucsv`
do
echo $line
//analyze statements
donehowever, if line contains space char, it will be broken. for example, if file content is:
#login,full name,email,project,role,action
gmwen,Bruce... (3 Replies)
Discussion started by: crest.boy
3 Replies
6. Shell Programming and Scripting
Hi
I am trying to write a small AWK program to extract 324 lines which have a pattern in the line numbers.
For examples, I want to extract lines 2, 5, 7, 11 and lines like (2+662), (5+662), (7+662), (11+662) and (2+662+662), (5+662+662), (7+662+662), (11+662+662) and so on for 27 times from... (5 Replies)
Discussion started by: ananyob
5 Replies
7. Shell Programming and Scripting
Hi frnd , hv nice week ahead,
in shell script i found 2 words as below
1 ) targ_found=`sed -n \`echo $line_no\`p sesslog.txt | grep -ic 'Targ Rowid'`
2 ) bracket_found=`sed -n \`echo $line_no\`p sesslog.txt | grep -wc ')'`
now we got he line number of 2 words. now i want to... (1 Reply)
Discussion started by: Gopal_Engg
1 Replies
8. Shell Programming and Scripting
Hi ,
I am currently using the while loop in bash shell, as follows.
while read line
do
echo $line
done < file.txt
However, i want to use the while loop on file.txt, which will read the file with 4 lines of gap.
Ex- if file.txt is a file of 100 lines, then i want to use the loop such... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies
9. Shell Programming and Scripting
I use while do - done loop in my shell script. It is working as per my expectations.
But I do not want to process all the lines. I am finding it difficult to exclude certain lines.
1) I do not want to process blank lines as well as lines those start with a space " "
2) I do not want to... (2 Replies)
Discussion started by: shantanuo
2 Replies
10. Shell Programming and Scripting
Hi,
I am new to ksh scripting so your help will be much appreciated.
I have a file called file.txt which looks like this
Header 20050702 20050703
ABC
DEF
Header 20050703 20050704
123
456
Header 20050704 20050705
XXX
YYY
What I am trying to do is write out each of the record... (7 Replies)
Discussion started by: Jtrinh
7 Replies