So pulling open a file with cat and then using grep to get matching lines only gets me so far when I am working with the particular log set that I am dealing with. It need a way to match lines to a| Unix & Linux Stack Exchange
Input file1 is: dog 123 4335 cat 13123 23424 deer 2131 213132 bear 2313 21313 I give the match the pattern from in other file ( like dog 123 4335 from file2). I match the pattern of the line ...| Unix & Linux Stack Exchange
Beginner’s Guide to Regular Expressions with Examples , and get an error like below, this is because the input being parsed does not have the number of fields expected. awk: run time error: negative field index $-1 The root problem is the awk expression was expecting a certain number ... Bash: resolving awk run time error, negative field index| fabianlee.org
Someone in the Golang team thought that it would be a good idea to| A Scripter's Notes
This is the most common way of my sed usage:| A Scripter's Notes
sed stands for stream editor.| A Scripter's Notes
I may occasionally publish small notes on clever commands I learn about. Putting it here helps me store knowledge that my shoddy personal data management practices might otherwise lose... One such note is a one-line sed command to print out the Linux interface(s) which handles the default route:| and1equals1.blogspot.com
Assuming that the IP addresses are in a file called list.txt in a format such as below: 1 2 3 4 5 6 7 8 9 104.28.29.66 92.40.175.51 116.255.32.201 91.150.51.170 108.167.20.103 5.187.159.175 166.198.250.121 74.78.184.213 ... A prerequisite for this is the geoiplookup command, which is available in the geoip-bin package on most distros. Run the following command to get the frequency distribution: 1 cat list.txt | xargs -n 1 geoiplookup | sed 's/GeoIP Country Edition: //g' | sort | uniq -c | sor...| Ishan Das Sharma