Suggestion Required
Author Message
Posted : Tue, 23 December 2008 00:59:29
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.
thobbs
Posted : Tue, 23 December 2008 18:05:37
Subject : Re: Suggestion Required
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.
teh_raab
Posted : Mon, 05 January 2009 12:17:26
Subject : Suggestion Required
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
teh_raab
Posted : Mon, 05 January 2009 12:19:06
Subject : Suggestion Required
Sorry to expand on that.. call the above script script2.sh the run your command/script e.g. script.sh & script2.sh