Tips tagged awk


5

Tip #510   iso2cd

My little "iso2cd" alias. Not clean, but handy. The Burning device will be auto detected.

example call:
iso2cd debian_lenny_final.iso

alias iso2cd="cdrecord -s dev=`cdrecord --devices 2>&1 | grep "\(rw\|dev=\)" | awk {'print $2'} | cut -f'2' -d'=' | head -n1` gracetime=1 driveropts=burnfree -dao -overburn -v" Read more »

4

Tip #502   Counts files in the current directory and subdirectory

Counts files in the current directory and subdirectory
Read more »

1

Tip #499   Get real names of current users

The line below will give you the real names of the users currently logged in:

Read more »

5

Tip #460   Random IP addresses

nmap -iR 20 -sL -n|awk '{print $2}'|grep '^[0-9]'|uniq Read more »

2

Tip #323  

It's for removing those orphaned config files! :D

Read more »

10

Tip #313   Get latest stable version of the Linux kernel

A simple shell script to get the latest stable version of the linux kernel:

Read more »

8

Tip #304   Get your IP in one line

#!/bin/bash
# by dj.r4iden
echo "Your ip Address is" `lynx --source http://www.formyip.com/ |grep The | awk {'print $5'}` Read more »

10

Tip #290   Crawl a web page for links

lynx -dump http://www.spantz.org | grep -A999 "^References$" | tail -n +3 | awk '{print $2 }' Read more »

110

Tip #275   Get an ordered list of subdirectory sizes

This piece of code lists the size of every file and subdirectory of the current directory, much like du -sch ./* except the output is sorted by size, with larger files and directories at the end of the list. Useful to find where all that space goes.

Read more »