10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies
2. Shell Programming and Scripting
I have a large dataset with following structure;
C 0001 Carbon
D SAR001 methane
D SAR002 ethane
D SAR003 propane
D SAR004 butane
D SAR005 pentane
C 0002 Hydrogen
C 0003 Nitrogen
C 0004 Oxygen
D SAR011 ozone
D SAR012 super oxide
C 0005 Sulphur
D SAR013... (3 Replies)
Discussion started by: Syeda Sumayya
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
8 Replies
4. Shell Programming and Scripting
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!! (3 Replies)
Discussion started by: leo.maveriick
3 Replies
5. Shell Programming and Scripting
Hi all
I have data like this:
model: 1, misfit value: 0.74987
1 1.182 1.735 2.056 1.867
2 0.503 1.843 2.018 1.888
3 2.706 2.952 2.979 1.882
4 8.015 3.414 3.675 1.874
... (1 Reply)
Discussion started by: fedora2011
1 Replies
6. UNIX for Dummies Questions & Answers
Hello all, I have a question regarding grep and pulling the result forward to the next carriage return or line space. Sorry if I have terminology incorrect. I have the following data set.
Line1
Line2
Line3
Line5
Line6
Line7
Line9
Line10
Line11
I would like to grep for a pattern... (5 Replies)
Discussion started by: klysdale
5 Replies
7. Shell Programming and Scripting
Hi Folks!
I have a file like this
000000006 dist:0.0 FILE ./MintRoute/MultiHopWMEWMA.nc LINE:305:1 NODE_KIND:131 nVARs:4 NUM_NODE:66 TBID:733 TEID:758
000000000 dist:0.0 FILE ./Route/MultiHopLEPSM.nc LINE:266:1 NODE_KIND:131 nVARs:4 NUM_NODE:66 TBID:601 TEID:626
000000001 ... (2 Replies)
Discussion started by: jackoverflow
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I'm looking for a command to retrieve a block of lines using sed or grep, probably awk if that can do the job.
In below example,
By searching for words "Third line2" i'm expecting to retrieve the full block starting with 'BEGIN' and ending with 'END' of the search.
Example:
... (3 Replies)
Discussion started by: learning_linux
3 Replies
9. Shell Programming and Scripting
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Discussion started by: hariza
4 Replies
10. UNIX for Dummies Questions & Answers
how do you print the lines that contain integers only, using grep or awk?
thanks ,
apalex
------------------
this file below:
qwerty
01234
asdfgh
01234
qwer12
asdf05
will be:
01234
01234
qwer12
asdf05 (5 Replies)
Discussion started by: apalex
5 Replies