Tips tagged grep


5

Tip #460   Random IP addresses

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

8

Tip #384   BBC Weather

Go to [http://www.bbc.co.uk/cgi-perl/weather/search/new_search.pl] and search for your location. Copy the link to the 3 day forecast feed, for example [http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/0105.xml]. Then just put that link into the following command to get a quick command line weather forecast.

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 »

3

Tip #311   Filter stderr for cron jobs

Tired to get your mailbox full of cron information messages?
Eg.: some programs (pg_dump, /etc/init.d/xxx, ...) output informational messages on stderr, but you can't close stderr because it may also contain failure informations.

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 »

8

Tip #282   Highlight Grepped Text

Grep file(s) and highlight the grep matches using less...

Read more »

0

Tip #259   Ghetto lsof when you don

You might want to get rid of the awk, sort, uniq and grep depending on how much info you need.

Read more »

6

Tip #258   List non-system users

I use the following to list non-system users. It should be portable though won't work on systems without the getent command.

Read more »

0

Tip #249   Sum up your HDD space

Longish oneliner (I actually wrote it in one line first) for giving you somewhat (mount list is never good enough) accurate sum of your file systems' totals.

Read more »