mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Dec. 06 2007,22:43 |
|
An equivalent is: echo "first.second.third" |awk -F. '{print $2}'
I would typically use awk for stuff like this, but it seems that cut is a little faster/lighter than awk. I suppose that's why it was created...
Quote | DOS doesn`t have the capacity to search or sort by "fields" like that. | Neither does Bash, but fortunately there is a wealth of commandline tools in *nix systems to accomodate your needs. There is always the option of using Cygwin in Windows, though, on which you can apparently add all your favorite tools familiar to Linux users.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|