Sponsored Content
Full Discussion: Help for a newby
Top Forums Shell Programming and Scripting Help for a newby Post 70815 by placroix1 on Wednesday 4th of May 2005 12:30:46 PM
Old 05-04-2005
Data Help for a newby

I am new to using nawk. When I put the following line in script file test1.awk
I get the results:

{ print NR, length($0),NF}

>nawk -f test1.awk head.txt

1 63 5
2 2622 188
3 2166 155
4 3192 228
5 2679 192
.....

but if I modify the test1.awk file to look like this:
BEGIN {FS = ","}
{ print NR, length($0),NF}

when if do:
>nawk -f test1.awk head.txt

I get

nawk: syntax error at source line 1
context is
<<< BEGIN {FS = >>> ","}
nawk: bailing out at source line 1

I have tried many combinations o single quotes, no quotes with the same result.

Any Idea Why???
 

3 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Make file newby question

1. The problem statement, all variables and given/known data: I'm brand new to make files, and I was hoping someone could tell me where I'm messing up. I'm trying to build a cpp program I wrote for class on a linux system, i'm using winscp and puTTy. The program works fine when I build it... (3 Replies)
Discussion started by: Casper3912
3 Replies

2. Shell Programming and Scripting

Newby needs help from an OpenSSL expert

Dear friends, Thank you for reading this post. Please download files here: http://www.idanfe.com/dl/files.zip This is my problem: I have to sign a file like my teste1.txt One sample signed file is example.txt I am also including a private key I generated called... (4 Replies)
Discussion started by: fundidor
4 Replies

3. Fedora

Newby: How to actually update software?!

Hi All - 1) I work with bigdate for a living, use lots of neat software, SAS, SQL Server, etc. I know how to get my data and such, analyze it, etc... 2) I use UNIX at work (Solaris mostly) and can easily navigate around Unix and get the job done, vi and sas -nodms are about my fav, and some... (6 Replies)
Discussion started by: sas
6 Replies
ucblinks(1B)					     SunOS/BSD Compatibility Package Commands					      ucblinks(1B)

NAME
ucblinks - adds /dev entries to give SunOS 4.x compatible names to SunOS 5.x devices SYNOPSIS
/usr/ucb/ucblinks [-e rulebase] [-r rootdir] DESCRIPTION
ucblinks creates symbolic links under the /dev directory for devices whose SunOS 5.x names differ from their SunOS 4.x names. Where possi- ble, these symbolic links point to the device's SunOS 5.x name rather than to the actual /devices entry. ucblinks does not remove unneeded compatibility links; these must be removed by hand. ucblinks should be called each time the system is reconfiguration-booted, after any new SunOS 5.x links that are needed have been created, since the reconfiguration may have resulted in more compatibility names being needed. In releases prior to SunOS 5.4, ucblinks used a nawk rule-base to construct the SunOS 4.x compatible names. ucblinks no longer uses nawk for the default operation, although nawk rule-bases can still be specifed with the -e option. The nawk rule-base equivalent to the SunOS 5.4 default operation can be found in /usr/ucblib/ucblinks.awk. OPTIONS
-e rulebase Specify rulebase as the file containing nawk(1) pattern-action statements. -r rootdir Specify rootdir as the directory under which dev and devices will be found, rather than the standard root directory /. FILES
/usr/ucblib/ucblinks.awk sample rule-base for compatibility links ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
devlinks(1M), disks(1M), ports(1M), tapes(1M), attributes(5) SunOS 5.10 13 Apr 1994 ucblinks(1B)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy