tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* AWK question
@ 2000-08-29 12:23 F. Winter
  0 siblings, 0 replies; 4+ messages in thread
From: F. Winter @ 2000-08-29 12:23 UTC (permalink / raw)
  To: tru64-unix-managers

Hi sysops!


Can anybody tell me how to combine two strings in AWK:

Here is the code that does not work:

for(i=1;i<length(e);i++)
{
  verz=""
  if (substr(e,i,1)==" ")
	verz=verz"\\ "
  else
	verz=verz+substr(e,i,1)
}

The + (plus) in the last line does not work.


Thanks.


--
 Frank Winter          Tel.: +(49)-40-42838-2404
 PHYSnet RZ            Email: winter@PHYSnet.uni-hamburg.de
 Uni Hamburg           
 Jungiusstr. 9
 D-20355 Hamburg       

^ permalink raw reply	[flat|nested] 4+ messages in thread

* awk question
@ 2001-05-23 23:52 
  0 siblings, 0 replies; 4+ messages in thread
From:  @ 2001-05-23 23:52 UTC (permalink / raw)
  To: tru64-unix-managers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

Hi admin,
One question.
If I have a plain text file with this lines inside


XXXXX YYYYYY /a1/s2/a2
XXXXX YYYYYY /a1/d2/a3
XXXXX YYYYYY /a1/z2/a4
XXXXX YYYYYY /a1/s2/a5

son i can use awk in order to retrive the last clue
that is only 
a2
a3
a4
a5

and to put in into another file.

Ideas?
Thanks!!
Manuel










_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger: Comunicaci�n instant�nea gratis con tu gente -
http://messenger.yahoo.es

^ permalink raw reply	[flat|nested] 4+ messages in thread

* awk question
@ 2001-05-24  7:09 Gerggee George
  0 siblings, 0 replies; 4+ messages in thread
From: Gerggee George @ 2001-05-24  7:09 UTC (permalink / raw)
  To: tru64-unix-managers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]


Hi Managers!

I have a file and it contains columns. I want to find the highest 
number in the fourth column. How can I do it?

--------------------------------------------------
 Mi az �n MailBox c�me? - http://mailbox.hu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* awk question
@ 2001-08-10 14:06 Joe LaCascio
  0 siblings, 0 replies; 4+ messages in thread
From: Joe LaCascio @ 2001-08-10 14:06 UTC (permalink / raw)
  To: tru64-unix-managers



How can I get awk to produce a singe quote in my output file?

For example:

awk '{print $1 ", " $2 ", " 'CA'}' some_file > foo

assuming some_file contained 

Bob Smith

I'd like the output to be

Bob, Smith, 'CA'

Thanks,
Joe

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-10 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-23 23:52 awk question 
  -- strict thread matches above, loose matches on Subject: below --
2001-08-10 14:06 Joe LaCascio
2001-05-24  7:09 Gerggee George
2000-08-29 12:23 AWK question F. Winter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox