Tips tagged awk


4

Tip #824   List only the files that have been updated today.

Use this command to list files that have been updated today in the current directory.

Read more »

2

Tip #818   Print first line of every paragraph

The awk command below will print out the first line of each paragraph in a file. Paragraphs must be separated by a blank line for this to work.

Read more »

10

Tip #816   Graph connections to hosts

The command below will print a ascii art graph of connections from you are making to different hosts

Read more »

0

Tip #770   Append a sequential number to a file

The command below will append a number to a file to count events, minutes, actions etc.

Read more »

7

Tip #742   Sort the lines of a file by length

The command below can be used to sort the lines of a file by ascending order (shortest first). Change 'sort -n' to 'sort -nr' to sort in descending order (longest first).

Read more »

0

Tip #741   Find the longest line in a file

This is how we can find the length of the longest line in a file.

Read more »

6

Tip #672   Concatenate pairs of lines

The following command will concatenate pairs of lines from a file, with a comma separating each line.

Read more »

3

Tip #562   Version all unversioned files in an SVN checkout

Sometimes, you want to add a lot of files to SVN from the command line. This simple command will find all unversioned files in an SVN checkout and adds them to SVN versioning.

Read more »

8

Tip #558   Being selfish - Kick all users except you

Kick all users other than you from your box and keep them out.

Read more »

20

Tip #551   My code is compiling

Simulate a never-ending compilation so you have an excuse for why you're browsing the net (see http://xkcd.com/303/):

Read more »