I need a awk command to select from a log-file only the lines that have on the 2nd field (considering "|" separator) one of the values 10.216.22.XX or 10.216.22.YY or 10.216.22.ZZ and on the 4th field only values that contain strictly digits.
Hi,
I have a file with colon separated values like below. How can i get those lines whose third field is 0 (zero). In the below example, lines starting with stapler and tempo has its third field as 0
Code:
$ cat list.txt
galaxy:b:5:world
stapler:a:0:hello
abc:a:4:stomper
kepler:uic:5:jam
tempo:havana:0:john
Hello I have a file like :
20120918000001413 | 1.17.163.89 | iSelfcare | MSISDN | N
20120918000001806 | 1.33.27.100 | iSelfcare | 5564 | N
....
I want to extract all lines that have on 4th field (considering "|" the separator ) something other than just digits. I want to do this using a awk one-liner ( I don;t want shell commands because combination of grep, while, cut..
I have a file contains around million number of lines. In the lines I have a field called transactionid, which has repeatitive values. What I need to do is to count them distinctly.
No matter of how many times a value is repeated, it should be counted as 1.
Can you help with a way.
I have a problem with the command join. "The default join field is the first, delimited by whitespace" (Cited from join --help). However, there is a field containing sentences in my tab-delimted files. Thus, I want to join the two files using -t\t (I also tried -t "\t" which reported errors under Cygwin, but not under CentOS).
Hello All,
I need your help in getting a command. I have a input file as below:
"A0C0VN","XZ70720","02","MEMBER ELIGIBILITY_DC",2012021308,"",,,20120213
I need a command to remove the field in Bold.
i have 3 files as below:
Code:
[test1][test2][test3]
i want to print 1st,2nd,5th and 10th filed of 1st to 5th lines from each files into a line of an output file, so the result would be:
[output]:
Code:
{line1}(field 1 of line 1 from file 1)(field 2 of line 1 from file 1)(field 5 of line 1 from file 1)(field 10 of line 1 from file 1)...(field 10 of line 5 from file 1)
{line2}(field 1
How can you find unique lines or duplicate lines in a file based on the content of the first field, or the first n characters ?
The uniq command on OS X lacks the -w switch that is available under Linux: -w, --check-chars=N : compare no more than N characters in lines, which solves the problem.
Can it be done without reimplementing uniq in awk ?
The number of fields is not constant.
I need help to extract coincidences from a file.
I capture network traffic with tcpdump command
tcpdump -Xvv -i eth0 > captureFile.txt
Given any field of IP headers, TCP and Ethernet specify all values found in the captured traffic and count how many times that value for that field.