01-25-2010
awk '/WINDOWS/&&/UNIX/&&/ORACLE/' *.txt
9 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I have to grep a data file called datebook.txt. The last information in each line is a salary. I have to grep all the lines which precede those lines with 6 figure salaries. I can't SID it, or use Perl. It has to be grep (or egrep or... (3 Replies)
Discussion started by: DrSammyD
3 Replies
2. Shell Programming and Scripting
hi i need help with below code.
if ]
then
log "Exiting the script as ID= NULL"
log "Please run script first."
fi
i am calling grep inside this but its not running any ideas why ??
input file is like this --
Msg 102, Level 20, State 1:
Server... (4 Replies)
Discussion started by: dazdseg
4 Replies
3. Shell Programming and Scripting
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies
4. Shell Programming and Scripting
Hi,
In this code can able to match the pattern without case sensitive. Is that possible?
if u knw plz help me...
code:
echo "Enter name to search"
read n
if ;
echo "name found"
else
echo "Not Found"
fi (8 Replies)
Discussion started by: boopal
8 Replies
5. Shell Programming and Scripting
I have below files under dir_a and dir_b and i want to sort out number of dir_a and dir_b files seperately and if i do the grep it should retrun 2 files in dir_a and 1 file in dir_b.
/dir_a/12345678
/dir_a/87654321
/dir_a/dir_b/12345687
But i am getting cat file|grep dir_a|wc -l
3... (6 Replies)
Discussion started by: prash358
6 Replies
6. Shell Programming and Scripting
Dear All,
I need help..
I am having a csv file.
Home_TITLE,People_TITLE,Repo_ALIAS
HMN5530,RKY5807,/mine_repo/rike001
HMN5530,SRY6443,/mine_repo/rike001
HMN5530,ARDY001,/mine_repo/rike001
If i have two value in varible RKY5807, HMN5530. how can fetch and store another value... (6 Replies)
Discussion started by: yadavricky
6 Replies
7. UNIX for Dummies Questions & Answers
file input
aaaa,52C
aaaa,50C
bbbb,50C
bbbb,58C
aaaa,52C
bbbb,50C
aaaa,30C
bbbb,58C
cccc,60C
i want to print uniq lines with its max value of column2
expected output
aaaa,52C
bbbb,58C
cccc,60C
tks (4 Replies)
Discussion started by: radius
4 Replies
8. UNIX for Dummies Questions & Answers
hi all,
i have an xml what i have to do is to search for the source id(s1) and if it matches with that in xml then extract the file mask from the name of the file i.e if the file name is
idr_%YYYY%%MM%%DD%_%N%.idr then , i want the part after first %
and before last % ie in this case
... (5 Replies)
Discussion started by: ramsavi
5 Replies
9. UNIX for Dummies Questions & Answers
I have file input
AAAA_XX_Start> rlong . 0W
130526-11:36:13 10.128.13.226 9.0j RBS_NODE_MODEL_N_1_50 stopfile=/tmp/13019
..
=================================================================================================================
MO ... (2 Replies)
Discussion started by: radius
2 Replies
LEARN ABOUT DEBIAN
combine
COMBINE(1) COMBINE(1)
NAME
combine - combine sets of lines from two files using boolean operations
SYNOPSIS
combine file1 and file2
combine file1 not file2
combine file1 or file2
combine file1 xor file2
_ file1 and file2 _
_ file1 not file2 _
_ file1 or file2 _
_ file1 xor file2 _
DESCRIPTION
combine combines the lines in two files. Depending on the boolean operation specified, the contents will be combined in different ways:
and Outputs lines that are in file1 if they are also present in file2.
not Outputs lines that are in file1 but not in file2.
or Outputs lines that are in file1 or file2.
xor Outputs lines that are in either file1 or file2, but not in both files.
"-" can be specified for either file to read stdin for that file.
The input files need not be sorted, and the lines are output in the order they occur in file1 (followed by the order they occur in file2
for the two "or" operations). Bear in mind that this means that the operations are not commutative; "a and b" will not necessarily be the
same as "b and a". To obtain commutative behavior sort and uniq the result.
Note that this program can be installed as "_" to allow for the syntactic sugar shown in the latter half of the synopsis (similar to the
test/[ command). It is not currently installed as "_" by default, but you can alias it to that if you like.
SEE ALSO
join(1)
AUTHOR
Copyright 2006 by Joey Hess <joey@kitenet.net>
Licensed under the GNU GPL.
moreutils 2012-04-09 COMBINE(1)