Sponsored Content
Full Discussion: Please help!!!
Top Forums Shell Programming and Scripting Please help!!! Post 302080864 by mhssatya on Thursday 20th of July 2006 07:41:54 PM
Old 07-20-2006
Reborg,

I have copied this entirely into a script file and tried to execute it. But I am getting this error I got before.

I copied correctly into the .ksh file

The error as follows:

Below is the script file and error below: i don't know where I am going wrong.




awk '{data[FNR] = $0; out=CARE01_DLY_???_date+%Y%m%d"_new";
file[FNR]=out;} END { if ( FNR - 2 == $1) { for ( i=2 ; i < FNR; i++ ) {
print data > file[i]} close(file[i])}else { print "error"} }'
CARE01_DLY_???_date+%Y%m%d


syntax error The source line is 1.
The error context is
{data[FNR] = $0; >>> out=CARE01_DLY_?? <<<
awk: The statement cannot be correctly parsed.
The source line is 1.

Please suggest.
 
SHCOMP(1)						       Korn shell utilities							 SHCOMP(1)

NAME
shcomp - compile a shell script SYNOPSIS
shcomp [ options ] [infile [outfile]] DESCRIPTION
Unless -D is specified, shcomp takes a shell script, infile, and creates a binary format file, outfile, that ksh can read and execute with the same effect as the original script. Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly. If -D is specified, all double quoted strings that are preceded by $ are output. These are the messages that need to be translated to locale specific versions for internationalization. If outfile is omitted, then the results will be written to standard output. If infile is also omitted, the shell script will be read from standard input. OPTIONS
[D dictionary] Generate a list of strings that need to be placed in a message catalog for internationalization. [n noexec] Displays warn- ing messages for obsolete or non-conforming constructs. [v verbose] Displays input from infile onto standard error as it reads it. EXIT STATUS
0 Successful completion. >0 An error occurred. SEE ALSO
ksh(1) IMPLEMENTATION
version shcomp (AT&T Research) 2003-03-02 author David Korn <dgk@research.att.com> copyright Copyright (c) 1982-2010 AT&T Intellectual Property license http://www.opensource.org/licenses/cpl1.0.txt 2003-03-02 SHCOMP(1)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy