Suggestion Required

Forum Index » Forums » Programming and Development
Author Message
Joined: Dec 20, 2008
Posts: 34
Other Topics
Posted Dec 23, 2008 at 12:59:29 AM
Subject: Suggestion Required
Hi Is it possible in bash scripting to print out some thing while some command is executing ? I am using redirecting command output to /dev/null device. and I want to print out something else like '!' instead of command output. is it possible then how. please guide me? thanks in advanced.
Back to top Profile Email Website
thobbs
Joined Oct 12, 2008
Posts: 238
Location:Texas!

Other Topics
Posted: Dec 23, 2008 6:05:37 PM
You should describe for us exactly what it is that you [i]really[/i] want to do. Both of your last questions have been about this same thing, and both times they have turned out to not solve what you thought they would. Please let us know what you actually need to accomplish, and we will try to help you; we don't have unlimited time to answer all questions on forums.
Back to top Profile Email Website
teh_raab
Joined Jan 05, 2009
Posts: 3

Other Topics
Posted: Jan 05, 2009 12:17:26 PM
Yes it is possible the "&" operator (without quotes) tells the command to run in the background. Here is a peiece of script that i wrote the other day to show a wait sign whilst a file did not exist... #!/bin/sh loop=0 interval=1 while [ ! -f hahahha.hs ] do clear loop=`expr $loop + 1` case $loop in 1) echo 'Building -' sleep $interval s ;; 2) echo 'Building \' sleep $interval s ;; 3) echo 'Building |' sleep $interval s ;; 4) echo 'Building /' sleep $interval s ;; *) loop=0 ;; esac done
Back to top Profile Email Website
teh_raab
Joined Jan 05, 2009
Posts: 3

Other Topics
Posted: Jan 05, 2009 12:19:06 PM
Sorry to expand on that.. call the above script script2.sh the run your command/script e.g. script.sh & script2.sh
Back to top Profile Email Website
Forum Index » Forums » Programming and Development