Sponsored Content
Full Discussion: Please help!!!
Top Forums Shell Programming and Scripting Please help!!! Post 302081087 by reborg on Friday 21st of July 2006 10:35:05 PM
Old 07-21-2006
Quote:
Originally Posted by mhssatya
Reborg,

The server is up and running. Here is the output. It still didn't create 2nd file.

+ dev=/biddf/ab6498/dev/ctl
+ cd /biddf/ab6498/dev/ctl
+ echo /biddf/ab6498/dev/ctl
/biddf/ab6498/dev/ctl
+ + date +%Y%m%d
files=CARE01_DLY_???_20060721
+ echo CARE01_DLY_AUS_20060721 CARE01_DLY_MKT_20060721
CARE01_DLY_AUS_20060721 CARE01_DLY_MKT_20060721
+ awk {data[FNR] = $0; out=FILENAME "_new"; file[FNR]=out;} END { if (
FNR - 2 == $1) { for ( i=2 ; i < NR; i++ ) { print data[i] > file[i]}
close(file[i])}else { print "error"} } CARE01_DLY_AUS_20060721
CARE01_DLY_MKT_20060721
awk: A print or getline function must have a file name.
The input line number is 5. The file is CARE01_DLY_MKT_20060721.
The source line number is 1.
looks like you missed a couple of changes...the ones in bold should be NR not FNR.
 
LPTCONTROL(8)						    BSD System Manager's Manual 					     LPTCONTROL(8)

NAME
lptcontrol -- a utility for manipulating the lpt printer driver SYNOPSIS
lptcontrol -e | -i | -p | -s [-d control_device] DESCRIPTION
The lptcontrol utility is used to set either the interrupt-driven, extended, standard, or polling mode of individual lpt(4) devices. When a printer is switched from a mode to another, this change will only take effect the next time the device is opened. Extended mode is anything the parallel port interface can support. For an ECP/ISA parallel port, it may be FIFO+DMA or ECP. The following command line options are supported: -e Turn on extended mode. -i Turn on interrupt-driven mode. -p Turn on polled mode. -s Turn on standard mode, i.e., turn off extended mode. -d control_device Set the mode of the printer control device specified by control_device. The default value for control_device is /dev/lpt0.ctl. One of -e, -i, -p or -s must be specified. FILES
/dev/lpt? printer devices /dev/lpt?.ctl printer control devices /sys/i386/conf/GENERIC kernel configuration file /boot/device.hints device hints for the parallel port chipset driver, ppc(4) SEE ALSO
lpt(4), ppc(4), device.hints(5) HISTORY
The lptcontrol utility first appeared in FreeBSD 1.1.5 AUTHORS
Geoffrey M. Rehmet BUGS
The control device name should never have been an option, but should have been an optional argument. Because of this, a single argument is treated as a device name. BSD
October 1, 2004 BSD
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy