10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
Discussion started by: cmccabe
0 Replies
2. Shell Programming and Scripting
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
I am trying to look for $2 of file1 (skipping the header) in $2 of file2 (skipping the header) and if they match and the value in $10 is > 30 and $11 is > 49, then print the line from file1 to a output file. If no match is foung the line is not printed. Both the input and output are tab-delimited.... (3 Replies)
Discussion started by: cmccabe
3 Replies
4. Shell Programming and Scripting
Hi,
This is the file content:
#160814 20:43:00 server id 2 end_log_pos 169934694 Query thread_id=8927407 exec_time=0 error_code=0
use sun_final/*!*/;
SET TIMESTAMP=1471207380/*!*/;
DELETE FROM `top_pack` WHERE `top_pack`.`id` = 3023
Trying like:awk... (5 Replies)
Discussion started by: ashokvpp
5 Replies
5. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
6. Shell Programming and Scripting
input file
abc1
abc23
abc12
abc15
output
abc1
abc12
abc15
abc23 (9 Replies)
Discussion started by: yanglei_fage
9 Replies
7. UNIX for Dummies Questions & Answers
Hello, can someone help me how to find a word and 2 lines after it and then send the output to another file.
For example, here is myfile1.txt. I want to search for "Error" and 2 lines below it and send it to myfile2.txt
I tried with grep -A but it's not supported on my system.
I tried with awk,... (4 Replies)
Discussion started by: eurouno
4 Replies
8. Shell Programming and Scripting
Hi,
I usually use Access to sort data however for some reason its not working. Our systems guys and myself cannot figure it out so ive tried to use AWK to do the sorting. The file is made up of single lines in the format
... (4 Replies)
Discussion started by: eknryan
4 Replies
9. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I dont know what I do wrong, I am trying to create shell programming database:
I have this command first:
&& > $fname
...
echo $Name:$Surname:$Agency:$Tel:$Ref: >> $fname
then I have
echo " Name Surname Agency Tel... (2 Replies)
Discussion started by: jeht
2 Replies
10. Shell Programming and Scripting
Hi,
I have some question and need some guidance how to sort and match multiple files.
1. all the data in the files are numbers
e.g. 1234567
1584752
2563156
2. each sorted file have their own ouput. e.g. test.csv -> test_sorted.csv
3. Then, I need to match all... (4 Replies)
Discussion started by: nazri76
4 Replies