Top "Awk" questions

AWK is an interpreted programming language designed for text processing and typically used as a data extraction and reporting tool.

Assigning system command's output to variable

I want to run the system command in an awk script and get its output stored in a variable. I've …

awk pipe
Split one file into multiple files based on delimiter

I have one file with -| as delimiter after each section...need to create separate files for each section using …

linux unix awk split
Using awk to remove the Byte-order mark

How would an awk script (presumably a one-liner) for removing a BOM look like? Specification: print every line after the …

unicode awk byte-order-mark
How to add text at the end of each line in unix

I am doing certain text processing operations and finally able to get a file something like this india sudan japan …

shell unix awk ksh
What are the differences between Perl, Python, AWK and sed?

just want to know what are the main differences among them? and the power of each language (where it's better …

python perl sed awk language-comparisons
How to save the output of this awk command to file?

I wanna save this command to another text: awk '{print $2}' it extract's from text. now i wanna save …

linux awk output
Remove all text before colon

I have a file containing a certain number of lines. Each line looks like this: TF_list_to_test10004/Nus_…

r unix replace sed awk
Printing only the first field in a string

I have a date as 12/12/2013 14:32 I want to convert it into only 12/12/2013. The string can be 1/1/2013 12:32 or 1/10/2013 23:41 I need only …

unix sed awk field cut
How to get the first column of every line from a CSV file?

How do get the first column of every line in an input CSV file and output to a new file? …

bash shell csv awk text-parsing
Is there a Unix utility to prepend timestamps to stdin?

I ended up writing a quick little script for this in Python, but I was wondering if there was a …

unix shell awk