03-23-2009
One thing I've noticed that's helped me in the past with loops and other scripts. Add a lot of echo lines so you know where the code is getting to, and also add in some counters so you know if it fails the first time, second time, etc...
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
whenever I am giving a 'ls' command system is going into infinite loop displaying the current home directory.
There is no separate shell script/file with ls name anywhere in the system.
I am using Solaris 10.
Any help / guidance in solving this problem is highly appreciated.
... (3 Replies)
Discussion started by: umakant
3 Replies
2. Programming
Production C code compiled without the dash-g option is running, and seems to be in an infinite loop. Is there a way to tell? Is there a diagnostic tool that will report what objects or what lines of code or even what functions are being executed?
Or is my best option to kill it with a dump?
... (5 Replies)
Discussion started by: marcus121
5 Replies
3. Shell Programming and Scripting
hi all,
this is how my scrip looks like
#!/bin/sh
bindir='/opt/apps/script/bin'
datadir='/opt/apps/script/data'
dir='/opt/apps/script'
while : ; do
ls -1rt /opt/apps/script/data/check.txt*|tail -1 > /dev/null 2>&1
if ;then
chmod +rwx $bindir/dummy2.sh
... (8 Replies)
Discussion started by: tententen
8 Replies
4. Shell Programming and Scripting
what is the difference between while:,while true and while false? (6 Replies)
Discussion started by: proactiveaditya
6 Replies
5. UNIX for Advanced & Expert Users
I wanted to copy (not forward but copy) all incoming email to another address of mine. It worked, but now I encountered an infinite loop problem: When the second address doesn't like the content and bounces the message back, the bounce message will be sent back and forth.
So, what I have in... (1 Reply)
Discussion started by: distill
1 Replies
6. Shell Programming and Scripting
Hi All,
I need to run an infinite loop.
requirement below:
function1 --> creates a file file1
function2 ---> need to call if the file creates
i am running these both function via a script --> script.sh
i need to run the function1 first and if the file file1 creates then need to run the... (3 Replies)
Discussion started by: satyaranjon
3 Replies
7. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
My problem is an infinite loop when i press any other key other then Y or y in the while loop. what i want it to do is return to the normal script outside of it if pressing N or n or keep asking the same question if its any other... (4 Replies)
Discussion started by: Ren_kun
4 Replies
8. Shell Programming and Scripting
Hi, I was debating if I should put this in the dummies or scripts section, I apologize in advance if I chose poorly.
Fairly new to Unix and BASH scripting but I thought I made it fairly well given my limited understanding. However, the output indicates that it's looping and I'm ending up with a... (5 Replies)
Discussion started by: gotreef
5 Replies
9. Shell Programming and Scripting
we have one script which we use to send mail in our environment. If we are giving correct attachment script runs fine but if we give a attachment name which is not present on server then this script go to infinite loop and causing all memory to be used. could any one please suggest me what is wrong... (2 Replies)
Discussion started by: anshu ranjan
2 Replies
10. Shell Programming and Scripting
I have a script script.shwhich is scheduled to run at 11 AM everyday.
# script.sh Code:
./scb_script.sh &
unfortunately scb_script.sh is running today in infinite loop as respective files are not available.
My question, when script.sh starts running tomorrow, will the old process be... (1 Reply)
Discussion started by: JSKOBS
1 Replies
LEARN ABOUT DEBIAN
xmlpretty
XMLPRETTY(1p) User Contributed Perl Documentation XMLPRETTY(1p)
NAME
xmlpretty - XML pretty printer
SYNOPSIS
xmlpretty [--options] [filename]
DESCRIPTION
xmlpretty is the commandline interface to XML::Handler::YAWriter, acting as a tool to add and remove pretty printing to XML files.
xmlpretty has several methods to add human readablitiy.
If you want to add readablity without adding so-called ignorable whitespace, use it in the following way :
$ xmlpretty --AddHiddenNewline
--AddHiddenAttrTab
--CatchEmptyElement
uglyfile.xml > prettyfile.xml
If you do not want to process the file further, but only want it human readable, add visible whitespace to the file as follows :
$ xmlpretty --PrettyWhiteNewline
--PrettyWhiteIndent
--CatchEmptyElement
uglyfile.xml > prettyfile.xml
You may use YAWriter to clean whitespace from XML documents. This may work in 99% of the cases where you want to get rid of ignorable
whitespace caused by the various forms of pretty printing.
$ xmlpretty --NoWhiteSpace
--NoComments
--AddHiddenNewline
--AddHiddenAttrTab
--CatchEmptyElement
prettyfile.xml > cleanfile.xml
Options
Options are given in a gnu like --option idiom.
AddHiddenNewline boolean
Add hidden newline before ">"
AddHiddenAttrTab boolean
Add hidden tabulation for attributes
CatchEmptyElement boolean
Catch empty Elements, apply "/>" compression
CatchWhiteSpace boolean
Catch whitespace with comments
IsSGML boolean
This option will cause start_document, processing_instruction and doctype_decl to appear as SGML. The SGML is still well-formed of
course, if your SAX events are well-formed.
NoComments boolean
Supress Comments
NoDTD boolean
Supress DTD
NoPI boolean
Supress Processing Instructions
NoProlog boolean
Supress <?xml ... ?> Prolog
NoWhiteSpace boolean
Supress WhiteSpace to clean documents from prior pretty printing.
PrettyWhiteIndent boolean
Add visible indent before any eventstring
PrettyWhiteNewline boolean
Add visible newlines before any eventstring
SAX1 boolean (not yet implemented)
Output only SAX1 compilant eventstrings
Bugs:
Automatic recoding between 8bit and 16bit does not yet work correctly !
I have Perl-5.6 at home and here I can specify "use utf8;" in the right places to make recoding work. But I dislike saying "use 5.00555;"
because many systems run 5.00503.
AUTHOR
Michael Koehne, Kraehe@Copyleft.De
Thanks
"Derksen, Eduard (Enno), CSCIO" <enno@att.com> helped me with the Escape hash and gave quite a lot of useful comments.
SEE ALSO
perl and XML::Parser::PerlSAX
perl v5.10.1 2010-02-18 XMLPRETTY(1p)