Re: how to export first string in command
Originally Posted by
sccuser
Hi, please help me in the following matter, that I would like to export the first string of certain line of command, for example:
root@ubuntu:~# who
root pts/0 2012-12-25 17:18 (ubuntu.domain.name.com)
firstname.lastname tty7 2012-12-25 16:55
The thing that I need is ONLY "firstname.lastname" information, not including the rest.
Much appreciated!
Have a good day guys.
hi
who | awk '{print $1}'
"What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht
Bookmarks