sed. It has a fixed, relatively simple scope of work defined by the idea of reading and examining each line of a file. sed is not designed to be particularly readable. It is designed to be very small and very efficient on very tiny unix servers.
I am trying to sum certain numbers in a column using
awk. I would like to sum just column 3 of the “smiths” to get a total of 212. I can sum the whole column using
awk but not just the “smiths”. I have:
Suppose I have a file (call it sample.txt) that looks like this:
Is there any tool in Solaris UNIX (so no GNU tool available) to subtract dates? I know that in Linux we have
gawk that can subtract one date from another. But in Solaris the maximum we have is
awk) which cannot perform date calculations. Also I cannot use perl.
I am looking for a way to add some string to the beginning of every line (same string for every line).
Not something customizable but rather something that will be easy to remember and available on every POSIX-compliant platform (and every shell as well).
I’m reading from a serial port connected to a gps device sending nmea strings.
I want to print the odd-numbered and even-numbered lines from files.
I want to retrieve whatever is between these two tags –
<tr> </tr> – from an html doc.
Now I don’t have any specific html requirements that would warrant for an html parser. I just plain need something that matches
</tr> and gets everything in between and there could be multiple
I tried awk, which works, but for some reason it ends up giving me duplicates of each row extracted.
I have a large file in the following format: