You're making the same mistakes again. This:
is almost always wrong since you can do it all with awk '{ extract something } ' file-with-9000-lines-of-junk in one operation instead of 9,000.
If you must save all its output, then:
Note that set -- overwrites your $1 $2 ... commandline variables.
Also note that functions have their own, independent set of $1 $2 ... variables. set -- there does not overwrite the global ones.
It splits it, yes. But as you've discovered it's possible to get blank elements. And usually there's no point in doing so -- string splitting works everywhere, not just in arrays, so why not cut out the middleman and do it directly?
Last edited by Corona688; 09-13-2012 at 02:16 PM..
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Hi ,
I have a peculiar case, where my sed command is working on a file which contains lines of small length.
sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt
when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine.
when abc.txt contains lines of... (3 Replies)
Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types:
(H)eader Records
(D)etail Records
(T)railer Records
The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Hi,
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Hello Everyone,
I'm running AIX 5.3 and need to generate a 100 character fixed length empty file from within a bash script that I am developing.
I searched and was able to find:
dd if=/dev/zero of=/test/path/file count=100
however my understanding is that this will generate a file of a... (10 Replies)
Hello Everyone,
I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table.
Input Data-
------ ------------------------ ---- -----------------
WFI001 Xxxxxx Control Work Item A Number of Records
------ ------------------------... (5 Replies)
Hi Team,
I have an issue to split the file which is having special chracter(German Char) using awk command.
I have a different length records in a file. I am separating the files based on the length using awk command.
The command is working fine if the record is not having any... (7 Replies)
Discussion started by: Anthuvan
7 Replies
LEARN ABOUT HPUX
nfsd
nfsd(1M)nfsd(1M)NAME
nfsd - NFS daemon
SYNOPSIS
#_conn] listen_backlog] protocol] device] [nservers]
DESCRIPTION
is the daemon that handles client file system requests. Only users with sufficient privileges can run this daemon.
The daemon is automatically invoked if and in the file.
By default, starts over the TCP and UDP transports for version 2 and version 3, and over TCP for version 4, if NFS version 4 is enabled.
One can change this with the option.
A previously invoked daemon started with or without options must be stopped before invoking another command.
Administrators wanting to change startup parameters for should make changes (as root user) to the NFS default file (see nfs(4)). Adminis-
trators can either edit this file or use the command to make changes.
Options
The following options are supported:
Start a NFS daemon over all available connectionless and connection-oriented transports, including UDP and TCP. Equivalent to set-
ting the parameter to in the NFS default file.
This sets the maximum number of connections allowed to the NFS
server over connection-oriented transports. By default, the number of connections is unlimited. Equivalent to the parameter
in the NFS default file.
Set connection
queue length for the NFS TCP over a connection-oriented transport. The default value is 32 entries. Equivalent to the
parameter in the NFS default file.
Start a NFS daemon over the specified protocol.
Equivalent to the parameter in the NFS default file.
Start a NFS daemon for the transport specified by the given device.
Equivalent to the parameter in the NFS default file.
Operands
The following operands are supported:
This sets the maximum number of concurrent NFS requests that the server can handle. This concurrency is achieved by up to nservers
threads created as needed in the kernel. nservers should be based on the load expected on this server. 16 is the usual number of
nservers. If nservers is not specified, the maximum number of concurrent NFS requests will default to 1. Changing the value of
nservers requires stopping and restarting Equivalent to the parameter in the NFS default file.
Notes
A directory service that provides service name data base support must have the following service entries in its database:
If the kernel tunable (see nfs_portmon(5)) is set to 1, then clients are required to use privileged ports (ports < IPPORT_RESERVED) to
receive NFS services. This tunable is set to 0 by default. Use (see kctune(1M)) to set this tunable.
By default, the NFS version 4 server is disabled. In order to enable it you must stop the NFS server. As root, either use the command (see
setoncenv(1M)) or edit to set the parameter to 4.
EXIT STATUS
Daemon started successfully.
Daemon failed to start.
WARNINGS
Manually starting and restarting is not recommended. If it is necessary to do so, use the NFS server start/stop script
FILES
client machine pointer to an open-but-unlinked file.
shell script for starting
startup parameters for
directories used by the server to manage client state
information; these directories should not be removed.
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO kctune(1M), mountd(1M), setoncenv(1M), getservent(3N), nfs(4), nsswitch.conf(4), services(4), sharetab(4), nfs_portmon(5).
nfsd(1M)