The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
RSS feeds to Email Mukka Shell Programming and Scripting 0 03-18-2008 06:27 PM
line feeds in csv gowrish Shell Programming and Scripting 10 09-01-2005 12:04 PM
Remove line feeds vsk Shell Programming and Scripting 8 06-16-2005 09:28 AM
removing spurious charactors from file old git Shell Programming and Scripting 6 07-08-2004 06:00 AM
carriage return/line feeds pitstop Shell Programming and Scripting 4 11-24-2003 11:47 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2007
Registered User
 

Join Date: Aug 2007
Location: Binfield, Berkshire. UK
Posts: 91
Stumble this Post!
Spurious line feeds

Hi all,

I know this is **awfully** general but.....

I have a script which does, basically...

for file in `find command`; do

some stuff
more stuff

echo '.\c'

done

I want to output the '.' char just to give an idea of progress. However, it works fine for a while and then I start getting spurious line feeds on the screen. The script still works and terminates OK but.....
Has anyone seen anything like this before? I thought it *might* be the terminal emulator (putty) I am using but it does it via a standard telnet via (under windows) as well.

Solaris 2.8
ksh

cheers
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-26-2007
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,795
Stumble this Post!
I just tried a loop from the command line using putty on my box. It just produced endless dots with no newlines. Except at the end.

You must be getting output to stdout or stderr from "some stuff && more stuff". Can you redirect the output of some stuff && more stuff to the bit bucket or to a file?
Reply With Quote
  #3 (permalink)  
Old 10-29-2007
Registered User
 

Join Date: Aug 2007
Location: Binfield, Berkshire. UK
Posts: 91
Stumble this Post!
Thanks for the input - I have 'inherited' this script and the original author was/is *very* fond of using function calls (even ones that are only called once!!). "stuff" and "more stuff" includes such calls so I will have to dig a bit deeper.

Thanks again
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0