Since I found this very helpful forum and friendly people, I have a small request.
I use AIX Unix and would like to know if there's a simple way how to do a kind of compare between two files. Should I use some grep, find or awk?
I have 2 text files, let's name them file1 and file2.
What I... (4 Replies)
Hi, i need some help plz...
The file data.txt contains: code of student,surname and name,code of lesson,grade of lesson.The number of lessons of each student is not the same.
25,Jackson Steve,12,4,34,2,65,2
29,Jordan Mary,13,6,23,8,56,4,34,2
04,Leven Kate,14,6,15,6,26,4
34,Owen... (10 Replies)
I'm trying to use awk to extract certain text from a file. The file looks like this:
Start
1 10
2 20
3 30
...
...
...
<some word>
Now what I want to extract is the list of numbers (without the search text printed) that occur between "Start" and <some word>. The catch is... (23 Replies)
Hi to all!
I need to make an script to find when an user changes the IP. The log file have this simple structure;
example.txt
Jack 192.168.1.2
Tom 192.168.12.225
Mary 192.168.1.22
Jack 192.168.1.5
Patrick 192.168.1.88If match the same user in the first column and have differents IP in... (3 Replies)
I am trying to print out sentences that meets a regular expression in awk (I’m open to using other tools, too).
I got the regular expression I want to use, "(\+ \{4\})" from user ripat in a grep forum. Unfortunately with grep I couldn't print only the sentence.
While searching for awk... (8 Replies)
Hi,
I have a file in the following format:
aabbba 25.31806899
baaabb 38.21808852
cccccu 1.31819523
552258121.31818253
ffddybb 5.41815555
almcamc87561812689
223aqas5.661828345
adacaaaaaaa1821285
adacaaaaaaa1821286
smckaa 3.81828756
ada2512510c1821287
ada2522511c1821328... (4 Replies)
Experts,
Here is my question.
I have got file like below
# cat file
XYZb,24,26,6
XYZc,24,26,6
XYZe,24,25,5
XYZf,23,29,5
XYZi,16,25,5
XYZj,24,26,7
XYZn,17,23,4
XYZz,23,29,5
Now, I want to print the line's Column1 whose Column 3 is the max of all.
My code is awk -F',' 'BEGIN {max... (9 Replies)
Hi All
I am sorry but I have to open a new thread about my issue.
My input files are:
file_1
ID_1 10
ID_2 15
ID_3 32
ID_4 45
ID_5 66
ID_6 79
ID_7 88
file_2
ID_3
ID_5My output file should be
ID_3 ID_1(-22) ID_2(-17) ID_4(-13) ID_5(34) (5 Replies)
I have a file that I am trying to find a specific word, then replace text within that string.
file
TestA2015
TestB2016
Example. Replace TestB2016 to TestB0000, so if TestB is found replace the original "2016" to "0000". Thank you :).
awk tried
awk '{ sub(/TestB$/, "0000", $6) }1'... (5 Replies)