Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Maybe my question isn't accurate enough. I meant not change the output of a command but to sort it sophisticated, based on a pattern rather than on a column number.
:-) netstat was just as an example but i'm ok to stick on it. Here is an output I got:
tcp 0 0 127.0.0.1:1521 127.0.0.1:32774 ESTABLISHED
tcp 0 0 10.10.0.95:139 10.10.0.91:3486 ESTABLISHED
if all you want is information on 127.0.0.1 I'd imagine you could (and sorry if I'm getting problem specific again) either specify in netstat only 127.0.0.1 or a more general solution would be to pipe netstat to grep to sort
Thanks for advice but netstat is not the point. lEt's take another example:
ls -all -1
brings output like:
...
-rw-r--r-- 1 cvs cvs 11411 Jul 19 15:33 dirs
-rw-rw-r-- 1 cvs cvs 397 Apr 10 10:38 files
...
I wanna sort _all_ the lines by minues (two digits coming after columns). This is just an example born by the original question:
how to sort output by pattern?
I see... well in that case you got me stumped... as far as I know there's no hard and fast way to do that ... how do you feel about bash or perl scripting?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.