For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > splitting IPs in shells

splitting IPs in shells

Created by dave. Last edited by dave, 5 years and 281 days ago. Viewed 614 times. #1
[edit] [rdf]
labels
attachments

Splitting an IP-like number into its components

...without using perl, or awk, or other nasties:

$ set `echo 10.20.30.40 | tr '.' ' '`
$ echo $1
10
$ echo $2
20
$ echo $3
30
$ echo $4
40
no comments | post comment

Virtual Dave Megaplex:

Internet Explorer 6 Users >>Click Here

(read this note about local search)

Logged in Users: (1)
… and a Guest.


Editing: snipsnap-help, Image Macro

Installed 2 years and 156 days ago
Powered By >>SnipSnap Version 1.0b1-uttoxeter

This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt