Click here to get back home

How to display the each executed line of a shell script?

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to display the each executed line of a shell script? Matt Benson 02-09-2005
Get Chitika Premium
Posted by Matt Benson on February 9, 2005, 2:05 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Perl CGI script to emulate a shell command line window January 18, 2005, 12:03 am
Help with a pagraph to be display as a one big line October 17, 2005, 10:08 am
Help: Display the specific line in a file February 13, 2008, 9:48 am
perl one liner to display the third line from the end of a file June 7, 2005, 3:27 pm
execute a shell script in a shell script December 3, 2007, 8:30 am
WMI script to display also the virtual memory January 31, 2006, 1:49 am
cant display generated html in browser (perl script) March 3, 2005, 11:03 pm
Display the answer in HTML code because CGI-SCript could not hide November 17, 2007, 11:47 pm
How to generate radio buttons in Perl/CGI script with call to shell script? November 23, 2007, 11:24 pm
passing arguments to a shell script from a perl script December 7, 2007, 2:44 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap