Re: using AWK

2012-12-18 Thread RW
On Mon, 17 Dec 2012 08:16:26 -0800 Devin Teske wrote: On Dec 17, 2012, at 3:39 AM, Jack Mc Lauren wrote: Hi guys How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script.

using AWK

2012-12-17 Thread Jack Mc Lauren
Hi guys How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script. Thanks in advance ___ freebsd-questions@freebsd.org mailing list

Re: using AWK

2012-12-17 Thread Ben Cottrell
Hi Jack, On Dec 17, 2012, at 03:39, Jack Mc Lauren jack.mclau...@yahoo.com wrote: How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script. I'm actually not sure what you're asking,

Re: using AWK

2012-12-17 Thread Frank Bonnet
On 12/17/2012 12:39 PM, Jack Mc Lauren wrote: Hi guys How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script. Thanks in advance ___

Re: using AWK

2012-12-17 Thread Jack Mc Lauren
Hi Jack, HI How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script. I'm actually not sure what you're asking, exactly -- you want the number to go into an awk variable? Or a shell

Re: using AWK

2012-12-17 Thread Polytropon
On Mon, 17 Dec 2012 04:22:21 -0800 (PST), Jack Mc Lauren wrote: Yes, I want the number to go into an awk variable. [...] This is what i wrote: #! /bin/sh filename=$0 awk 'getline no filename; print no' But when I run this script sh /awk_no.sh /var/no.txt I have this error :

Re: using AWK

2012-12-17 Thread Ben Cottrell
On Dec 17, 2012, at 04:22, Jack Mc Lauren jack.mclau...@yahoo.com wrote: This is what i wrote: OK -- I'm adjusting my assumptions about what you're trying to do. :-) Bear with me: #! /bin/sh filename=$0 So (a) there's only one input file, not multiple... and (b) it should come from the

Re: using AWK

2012-12-17 Thread Devin Teske
On Dec 17, 2012, at 3:39 AM, Jack Mc Lauren wrote: Hi guys How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script. Thanks in advance Try this: awk -v file=/etc/ttys 'BEGIN {

Re: using AWK

2012-12-17 Thread Polytropon
On Mon, 17 Dec 2012 08:16:26 -0800, Devin Teske wrote: On Dec 17, 2012, at 3:39 AM, Jack Mc Lauren wrote: Hi guys How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want to use this awk program in a shell script.

Re: using AWK

2012-12-17 Thread Devin Teske
On Dec 17, 2012, at 8:23 AM, Polytropon wrote: On Mon, 17 Dec 2012 08:16:26 -0800, Devin Teske wrote: On Dec 17, 2012, at 3:39 AM, Jack Mc Lauren wrote: Hi guys How can I read a file which contains a number and assign that number to a variable via awk programming? By the way, I want

using AWK - Thanks :)

2012-12-17 Thread Jack Mc Lauren
Hi all Thank you so much my friends,  Ben Frank Polytropon Devin you helped me so much :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to

Re: OT: Shell Script using Awk

2008-11-02 Thread Jonathan McKeown
that containing records, each delimited by a single space. I need to print those records in columnar format, but with only 7 columns per line: record1 record2 record3 record4 record5 record6 record7 record08 record09 record10 record11 record12 record13 record14 Are you dead set on using awk(1

Re: OT: Shell Script using Awk

2008-11-02 Thread Josh Paetzel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Allen wrote: On 11/1/08, Sahil Tandon [EMAIL PROTECTED] wrote: David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data

OT: Shell Script using Awk

2008-11-01 Thread David Allen
My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String that containing records, each delimited by a single space. I need to

Re: OT: Shell Script using Awk

2008-11-01 Thread Jeremy Chadwick
On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String

Re: OT: Shell Script using Awk

2008-11-01 Thread David Allen
On 11/1/08, Jeremy Chadwick [EMAIL PROTECTED] wrote: On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to

Re: OT: Shell Script using Awk

2008-11-01 Thread Jeremy Chadwick
On Sat, Nov 01, 2008 at 08:17:54PM -0800, David Allen wrote: On 11/1/08, Jeremy Chadwick [EMAIL PROTECTED] wrote: On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm

Re: OT: Shell Script using Awk

2008-11-01 Thread Gary Newcombe
On Sat, 1 Nov 2008 18:21:55 -0700, David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very

Re: OT: Shell Script using Awk

2008-11-01 Thread Gary Newcombe
On Sat, 1 Nov 2008 20:17:54 -0800, David Allen [EMAIL PROTECTED] wrote: On 11/1/08, Jeremy Chadwick [EMAIL PROTECTED] wrote: On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a

Re: OT: Shell Script using Awk

2008-11-01 Thread Sahil Tandon
David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String that containing records,

Re: OT: Shell Script using Awk

2008-11-01 Thread David Allen
On 11/1/08, Gary Newcombe [EMAIL PROTECTED] wrote: On Sat, 1 Nov 2008 18:21:55 -0700, David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple

Re: OT: Shell Script using Awk

2008-11-01 Thread David Allen
On 11/1/08, Sahil Tandon [EMAIL PROTECTED] wrote: David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I