Re: awk question



On Nov 26, 10:25 am, Ed Morton <mor...@xxxxxxxxxxxxxx> wrote:
On 11/26/2007 9:23 AM, rva...@xxxxxxxxx wrote:



I want to assign a variable using awk:

set myvariable = `awk '{print $1}' cool`

how can extract the contents of cool and assign it to myvariable.

This doesn't work.

In what way?

I have done this before and I cannot remember how to do this

This is an OS question, not an awk question so you'd be better posting it to an
OS-specific NG (e.g. comp.unix.shell if the above is UNIX shell script).

Ed.


Thats false. I am trying to use awk and have a variable assigned.
.



Relevant Pages

  • Re: An AWK question
    ... > I have a script that tells me when a mailbox exceeds 2MB. ... It's not an awk question. ... To unsubscribe, ...
    (freebsd-questions)
  • Re: An AWK question
    ... how can I modify this script to tell me when a file ... >> Jack L. Stone ... It's not an awk question. ... To unsubscribe, ...
    (freebsd-questions)
  • Re: Awk Question
    ... Subject: Awk Question ... Awk experts (or anyone able to script this): ... I have a text file that contains the following characters. ...
    (AIX-L)