Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > SuSE Linux Help
Reload this Page override using echo
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

SuSE Linux Help For help and discussions related to SuSE Linux

Reply
 
Thread Tools Display Modes
Old 05-08-2008   #1 (permalink)
kamranhameed
Just Joined!
 
Join Date: Feb 2008
Posts: 28
override using echo

folks. i am writing a simple shell script that prints the number from 100 to 200.

But my requriment is that when is should run it, it should not show me the output like

100 101 102 ... 200

intead i want that it shoud print 100, then override 100 and print 101 then override it and print 103 ... till 200.

How can we do that using echo


i am doing

echo -e -n "$var \r"

But its giving me nothing in output??

Any Ideas?
__________________
Kamran .
kamranhameed is offline   Reply With Quote
Old 05-09-2008   #2 (permalink)
gogalthorp
Linux Guru
 
gogalthorp's Avatar
 
Join Date: Oct 2006
Location: West (by God) Virginia
Posts: 1,827
1) did you change permissions to +x ??

2) are you running it by
sh script
where script is the name of your script?

3) you should put a plain echo after the loop so to move to the next line otherwise the prompt will overwrite the output

4) This will happen very fast chances are you will only see the last number. Are you putting a delay into the loop so you can see the count progress??
gogalthorp is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 03:58 AM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0