Sponsored Content
Top Forums Shell Programming and Scripting usr/bin/ls: 0403-027 The parameter list is too long Post 302329206 by methyl on Friday 26th of June 2009 07:31:44 AM
Old 06-26-2009
To avoid the problem of the "for" line getting to long use "while" not "for". We can then deal with any number of files.
If we redirect the error channel from "ls" we stop "ls" failing if there are no matching files. We now don't need to count the files or deal with the problem that the "find" actualy counts the files in the subdirectories too.

Code:
We can replace:

pntcnt=`find . -name 'PNT.*' -type f | wc -l`
if [[ $pntcnt -gt 0 ]] then
for gfile in `ls -1 /$ROOTDIR/scp/inbox/PNT.2*`
do

With:

ls -1d /$ROOTDIR/scp/inbox/PNT.2* 2>/dev/null | while read gfile
do

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Grep 0403-027 The parameter list is too long.

Hi there I get this error message when I try to do a basic grep. Does anyone have any ideas what is wrong. Thanks 0403-027 The parameter list is too long. (1 Reply)
Discussion started by: japada
1 Replies

2. Shell Programming and Scripting

command find returned bash: /usr/bin/find: Argument list too long

Hello, I create a file touch 1201093003 fichcomp and inside a repertory (which hava a lot of files) I want to list all files created before this file : find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies

3. Shell Programming and Scripting

ksh: /bin/grep: arg list too long

when i run the command below in a directory which contains too many files i got the error: ksh: /bin/grep: arg list too long ls|grep AA*B* how can i handle this problem? (5 Replies)
Discussion started by: gfhgfnhhn
5 Replies

4. UNIX for Dummies Questions & Answers

ksh: /usr/bin/ls: arg list too long

I am using IBM AIX unix version 4.3.3.0. In a directory there are many files with different patterns. When I am trying to execute the command, ls -l with the file pattern, which have fewer files it gives the desired result. However when I am trying to execute the same command for file pattern,... (2 Replies)
Discussion started by: jitindrabappa
2 Replies

5. UNIX for Dummies Questions & Answers

0403-027 The parameter list is too long.

hi when i ran the following command rm *_F i got this error 0403-027 The parameter list is too long. It shd remove 5000(around) files pls help me on this. why its throwing this error how to rectify this error (5 Replies)
Discussion started by: romiljain
5 Replies

6. Shell Programming and Scripting

/usr/bin/ls: 0403-027 the parameter list is too long.

Hi, I'm trying to list specific files and redirecting to a file ls aqp* > temp.lst but getting "/usr/bin/ls: 0403-027 the parameter list is too long." error. I just have 236 files in the directory. I tried "ls | grep 'aqp*' > temp.lst" too, but nothing was redirected. + grep aqp* +... (4 Replies)
Discussion started by: dateez
4 Replies

7. UNIX for Dummies Questions & Answers

UNIX: 0403-027 The parameter list is too long

Hello All, We have a batch job that clean old records. This run a script to back up file then delete. Unfortunately, this job been failing lately. This is the error we received. "/usr/bin/compress: 0403-027 The parameter list is too long." I am not sure if the job failed since its... (2 Replies)
Discussion started by: juieshenkei
2 Replies

8. AIX

aix:ksh: /usr/bin/rm: 0403-027 The parameter list is too long.

Hi, I am getting the below error message When i am trying to delete the files from the directory.Could you please guide me? rm *.aud ksh: /usr/bin/rm: 0403-027 The parameter list is too long. and find /oracle/admin/testP/adump/*.aud -mtime +5 -exec rm {} \; ksh: /usr/bin/find:... (3 Replies)
Discussion started by: nokiae63
3 Replies

9. AIX

0403-027 The parameter list is too long on AIX 5.3

Hi we are using AIX 5.3 64bit I have near about 79000 log file having naming convention like "IFTMBCSun Aug 14 07:45:00 PAKST 2011". This naming convention was created by a script error, now we need to rename these log file by removing extar spaces and (:) colon for that we wrote below script ... (4 Replies)
Discussion started by: lodhi1978
4 Replies
gotst(1)						       Scotch user's manual							  gotst(1)

NAME
gomtst - compute statistics on sparse matrix orderings SYNOPSIS
gotst [options] [gfile] [ofile] [lfile] DESCRIPTION
The gotst program computes, in a sequential way, statistics on a sparse matrix ordering, such as fill-in, operation count, and separator tree parameters: minimum, maximum, average height and variance of its leaves. Source graph file gfile can only be a centralized graph file. File ofile represents the ordering of the symmetric sparse matrix the pattern of which is represented by gfile. The resulting statistics are stored in file lfile. When file names are not specified, data is read from standard input and written to standard output. Standard streams can also be explicitly represented by a dash '-'. When the proper libraries have been included at compile time, gtst can directly handle compressed graphs, both as input and output. A stream is treated as compressed whenever its name is postfixed with a compressed file extension, such as in 'brol.grf.bz2' or '-.gz'. The compression formats which can be supported are the bzip2 format ('.bz2'), the gzip format ('.gz'), and the lzma format ('.lzma', on input only). Since gotst performs sequentially the symbolic factorization of matrix gfile in order to compute fill-in and operation count numbers, this program can take a long time or even run out of memory, when applied to very large graphs. OPTIONS
-h Display some help. -V Display program version and copyright. EXAMPLE
Display statistics on ordering brol.ord of graph brol.grf: $ gotst brol.grf brol.ord SEE ALSO
gord(1), gtst(1), dgord(1). Scotch user's manual. AUTHOR
Francois Pellegrini <francois.pellegrini@labri.fr> February 14, 2011 gotst(1)
All times are GMT -4. The time now is 08:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy