Sponsored Content
Top Forums Shell Programming and Scripting Is this a bug or a limitation? Post 302095769 by gilberteu on Friday 10th of November 2006 01:39:22 AM
Old 11-10-2006
Is this a bug or a limitation?

Hi,

I'm having a problem with a while loop syntax that doesn't seem to loop correctly.

TODAY=`date +%d%m%Y`
while read hostname
#for hostname in $(cat $CONFIG)
do
OUTFILE=/tmp/health_check.$hostname.$TODAY

if [ ! -f $OUTFILE ]
then
touch $OUTFILE
func_header
else
rm $OUTFILE
func_header
fi

funcCheckIP # Calls a function


print
print " *** Automated Health Check on host $hostname completed *** "
print
print "** A summary of each checks have been written to a logfile."
print "** The logfile is located at $OUTFILE"
print "** Take note that the logfile does not contain any details of any errors"

done < $CONFIG


$CONFIG is a file (/tmp/hosts.name) where the contents are:
redang
tioman
sipadan

The wierd part is, when I played around by:

1) removing the calling function and replace it with a "print $hostname" all hosts are printed correctly.
2) replacing the while loop with "for hostname in $(cat $CONFIG)", all hosts are called properly.

Is there a limitation of a function calling another function and the number of loops allowed within the parent loop? Or am I making any sense at all? Any pointers are appreciated.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find limitation

Hi , i'm trying to use "find "command with "-size "option but i encounter 2gb file limitation. Can you confirm this limitation ? Is there a simple way to do the same thing ? My command is : <clazz01g-notes01>/base/base01 # find /base/base01 -name '*.nsf' -size +5242880000c -exec ls... (2 Replies)
Discussion started by: Nicol
2 Replies

2. HP-UX

HP-UX 11i - File Size Limitation And Number Of Folders Limitation

Hi All, Can anyone please clarify me the following questions: 1. Is there any file size limitation in HP-UX 11i, that I can able to create upto certain size of file (say 2 GB) and not more then that???? 2. At max. how many files we can able to keep inside a folder???? 3. How many... (2 Replies)
Discussion started by: sundeep_mohanty
2 Replies

3. Shell Programming and Scripting

Limitation of ls command

Hi, Iam using an alias to get the file count from one directory using normal ls command like ls file*|wc -l.If my file increases more than 35,000 ,my alias is not working.It shows that arg list too long. is that can be limitation of ls or problem in alias? I would appreciate if anyone can... (2 Replies)
Discussion started by: cskumar
2 Replies

4. Shell Programming and Scripting

Awk limitation

Hi All, I have an awk code below. I have an input file which has a line which has a last field with about 4000 characters and it pop up an error stated below. It is too much for awk to take ? Awk Code: {if( $NF == "2007" && $1 == "**" ) LINE = $0;} END{printf("%20s\n",LINE); } Error:... (28 Replies)
Discussion started by: Raynon
28 Replies

5. UNIX for Dummies Questions & Answers

grep limitation

Hello, I am looking for a way to get around an issue, as I am using the grep command in a very common situation: grep ^50 File.*.txt | "some awk process" My problem is that bash throws me an error on the grep command if the directory in question contains several thousands files. ... (6 Replies)
Discussion started by: Indalecio
6 Replies

6. HP-UX

Limitation on *.ext

Is there a size limit when passing an argument using wildcards? I.E. when I pass an argument in the form (like) "ftp_auto *.txt" - is there a limitation on the size of UNIX expanding "*.txt" ? (1 Reply)
Discussion started by: vslewis
1 Replies

7. Shell Programming and Scripting

Limitation on rm command

Hi all, does any one know ,if there is any limitation on rm command limitation referes here as a size . Ex:when my script try to rum rm command which have size of nearly 20-22 GB ..CPU load gets high ? if anyone know the relation of CPU load and limitation of rm command . (8 Replies)
Discussion started by: niteshagrawal06
8 Replies

8. UNIX for Dummies Questions & Answers

Limitation in addition

whats wrong with this addition? Whats the maximum number of digits can be handled? pandeeswaran@ubuntu:~/Downloads$ const=201234454654768979799999 pandeeswaran@ubuntu:~/Downloads$ let new+=const pandeeswaran@ubuntu:~/Downloads$ echo $new -2152890657037557890 pandeeswaran@ubuntu:~/Downloads$ (4 Replies)
Discussion started by: pandeesh
4 Replies

9. AIX

What is the limitation in AIX?

Hi All, i got few questions... 1) What is the maximum number of files that we can save under a single directory in AIX ? (* we have enough storage/disk space) 2) And what is the maximum number of sub - directories in side a directory? I know that...every directory is a (special)... (11 Replies)
Discussion started by: System Admin 77
11 Replies
LPSPP(1)							   User Commands							  LPSPP(1)

NAME
lpspp - pretty print an LPS SYNOPSIS
lpspp [OPTION]... [INFILE [OUTFILE]] DESCRIPTION
Print the mCRL2 LPS in INFILE to OUTFILE in a human readable format. If OUTFILE is not present, stdout is used. If INFILE is not present, stdin is used. OPTIONS
OPTION can be any of the following: -fFORMAT, --format=FORMAT print the LPS in the specified FORMAT: 'default' for a process specification (default), 'internal' for a textual ATerm representation of the internal format -n, --print-summand_numbers print numbers in front of summands --timings[=FILE] append timing measurements to FILE. Measurements are written to standard error if no FILE is provided Standard options: -q, --quiet do not display warning messages -v, --verbose display short intermediate messages -d, --debug display detailed intermediate messages --log-level=LEVEL display intermediate messages up to and including level -h, --help display help information --version display version information AUTHOR
Written by Aad Mathijssen and Jeroen Keiren. REPORTING BUGS
Report bugs at <http://www.mcrl2.org/issuetracker>. COPYRIGHT
Copyright (C) 2012 Technische Universiteit Eindhoven. This is free software. You may redistribute copies of it under the terms of the Boost Software License <http://www.boost.org/LICENSE_1_0.txt>. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
See also the manual at <http://www.mcrl2.org/mcrl2/wiki/index.php/User_manual/lpspp>. lpspp mCRL2 toolset 201202.0 (Release) April 2012 LPSPP(1)
All times are GMT -4. The time now is 03:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy