For Programmers: Free Programming Magazines  


Home > Archive > AWK > January 2005 > awk /%/









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author awk /%/
frank

2005-01-27, 8:55 pm

does anyone know what

awk /%/ does ( its true meaning )

eg

#df -k | awk /%/ | sort +5

what is the awk /%/ doing here and could it simply put like this

#df -k | sort +5
The object is to sort the last column alphabetically


Frank

Ed Morton

2005-01-27, 8:55 pm



frank wrote:
> does anyone know what
>
> awk /%/ does ( its true meaning )


It selects input records that contain a "%" sign.

> eg
>
> #df -k | awk /%/ | sort +5
>
> what is the awk /%/ doing here


Getting rid of any output from df -k that doesn't contan a %.

and could it simply put like this
>
> #df -k | sort +5
> The object is to sort the last column alphabetically


Yes if every line df -k output contains a %, no otheriwse.

Ed.

>
> Frank
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com