Hi Guys,
Need you quick assistance on the below, trying to extract a word from a variable
i.e. acmi101[space]acmi102[space]acmi103[space]acmi104
When i use the following code awk '{$2=""}1' it leaves a space in the variable, need to get rid of the space that it leaves. Any ideas.
result...
Ok what I am trying to achieve is that the program would read the first 3 lines and then align the first columns of the first 3 lines together, and the same for the 2nd columns and so forth.
So something like this
Available Assigned Used Max
Space Space Pages Pct
(MB) (MB) Util...
Hi Guys,
Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated.
Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n"
TIME SERVER/CLIENT TEXT...
Thanks guys for getting back on this one, sorry it was late in the night when I was typing, so could think of a descritive subject. But thats absolutly wonderful. Thanks once again for the response.
Hi Guys,
What is the quickest way to do the following?
Name Address Tel No email website Fax No
to
Name#Address#Tel No#email#website#Fax No
Your comments would be kindly appreciated.
Thanks
Ed
Thks Annihilannic, for your time on this.....only if i was really able to understand how awk does its processing....i kno w there are lots of books and websites for awk tutorial, but is there any resource that you can point me too, for a better understanding.
Thks once again.
Hi Guys,
After sleepless night, came up with the below solution, might not be elegant, but works......please let me know if there is a better solution than the below.
Many Thanks for all you help on this one.
Cheers
Ed
=======================================================
Code...
Annihilannic,
Thks for the tip above, but i cant seem to usr NR==2 before NR==1. It seems like i have to use the NR sequentially. Below is what i have come up with so far, but doesnt seem to work
awk '
NR==2 { t=$1; next }
NR==1 { print $1,t,$3; next }
NR==3 { print $1,$2,$3...
Hi,
Please i am trying to perform the following using awk, and i havent got a clue on where to start, can someone help or direct me to a useful resource.
My file is shown below
0.00 75.72 0
135.76 206.40 0
819.12 1077.72 0
1744.60 2003.72 0
2609.12 2868.72 0
3374.44 3715.60 0
want to...
hello PIV,
What about when $10 and $11 variables haven't got a pattern to search for i.e.
root 1769 0.0 0.1 1568 76 tty1 S Jul09 /sbin/mingetty hello how are you my friend
root 1769 0.0 0.1 1568 76 tty1 S Jul09 0:00 /usr/local/bin a b c d e f g h
Any ideas????
Thank you everyone for your contribution to this request. I probably did not explain myself better, but what I am trying to do is as follows:
ps aux | grep hello
Output from hello:
root 1769 0.0 0.1 1568 76 tty1 S Jul09 /sbin/mingetty hello how are you my friend
root...
Hello guys,
I am trying to split the following line using awk. I have tried every possible unix command sed, awk, cut, and tr, but to not avail.
PLS can you help.
What I am tryin to do is as follows
Line that needs to be processed is as follows:
root 1769 0.0 0.1 1568 76 tty1...
Hello guys,
Please can someone tell me how to do the following using awk?
I am trying to get the filenames of the following
/a/b/c/d.ksh
/a/b/e.ksh
/a/f/c/d/f/d/i.ksh
/a.ksh
Any help will be of great use
Thks
Ed
Hello guys,
I am trying to split the following line using awk. I have tried every possible unix command sed, awk, cut, and tr, but to not avail.
PLS can you help.
What I am tryin to do is as follows
Line that needs to be processed is as follows:
X11.base.rte 4.3.3.75 COMMITTED...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.