10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have 2 tab-delimited input files as follows.
file1.tab:
green A apple
red B apple
file2.tab:
apple - A;Z
Objective:
Return $1 of file1 if,
. $1 of file2 matches $3 of file1 and,
. any single element (separated by ";") in $3 of file2 is present in $2 of file1
In order to... (3 Replies)
Discussion started by: beca123456
3 Replies
2. Shell Programming and Scripting
Hi,
I have a following code in which I am unable to redirect to multiple files. Can anybody please help with some corrections
awk -F, '{ if ( substr($1,26,2)=="02" && substr($1,184,14)=="MTSCC_VALFIRST") {
array1++
array2++
array3++
}
else if (substr($1,26,2)=="03" &&... (4 Replies)
Discussion started by: siramitsharma
4 Replies
3. Shell Programming and Scripting
Hi friends,
I have a some files in a directory. for example
856-abc
856-def
851-abc
945-def
956-abc
852-abc
i want to display only those files whose name starts with 856* 945* and 851* using a single pattern.
i.e
856-abc
856-def
851-abc
945-def
the rest of the two files... (2 Replies)
Discussion started by: Little
2 Replies
4. Shell Programming and Scripting
I have one single shown below and I need to break each ST|850 & SE to separate file using unix script. Below example should create 3 files. We can use ST & SE to filter as these field names will remain same.
Please advice with the unix code.
ST|850
BEG|PO|1234
LIN|1|23
SE|4
ST|850... (3 Replies)
Discussion started by: prasadm
3 Replies
5. Shell Programming and Scripting
Hi ,
I have a file which has multiple rows of data, i want to match the pattern for two columns and if both conditions satisfied i have to add the counter by 1 and finally print the count value. How to proceed...
I tried in this way...
awk -F, 'BEGIN {cnt = 0} {if $6 == "VLY278" &&... (6 Replies)
Discussion started by: aemunathan
6 Replies
6. Shell Programming and Scripting
Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Discussion started by: hnux
3 Replies
7. Shell Programming and Scripting
Please help me in this issue.
I am unable to get the job,seems the awk not browsing the files.
Please find my tries below.
I have attached two files :
1.tobesearched.txt - a glimpse of a huge log file.
2.searchstring.txt - searching keys.
these are the two scripts i tried writing:
... (7 Replies)
Discussion started by: deboprio
7 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am trying to write a script that list down all the files that do not match the pattern
My pattern will be like this "*.jpg|*.xml|*.sql". This pattern will be stored in a file. The script need to read this pattern from the file and delete the files that does not match this pattern. It... (7 Replies)
Discussion started by: meenavin
7 Replies
9. Shell Programming and Scripting
File 1
#################################################################
pma.zcal.iop_pma_zcal_cntl (2710.080 115.200)
pma.lanea23.rx0.cntl (696.960 844.800)
pma.lanea67.rx0.cntl (1733.760 844.800)
pma.zcal.iop_pma_zcal_cust (2280.960 115.200)... (1 Reply)
Discussion started by: jaita
1 Replies
10. UNIX for Dummies Questions & Answers
Hi Guys,
I am new to the forum and to scripting so bear with me.
Thanks, Gary.
I have 3 files - file1, file2, file3
I am trying to come up with a script that will check the output of these files and if the 1st nine fields are matched in all 3 files, echo "The following string had been... (2 Replies)
Discussion started by: gazza-o
2 Replies