1752726 Members
5724 Online
108789 Solutions
New Discussion юеВ

Re: playing around

 
SOLVED
Go to solution
Mark McDonald_2
Trusted Contributor

playing around

Hi All, I'm just playing around (best way to learn?), having a problem with the script below. I cannot get the script to print the horizontal line. I've tried quotes and escaping it with no luck. Any Ideas?

clear
tput cup 10 15
echo working:

for S in / \- \\ \| / \- \\ \|
do
tput cup 10 24
print $S
sleep 1
done
4 REPLIES 4
Mark McDonald_2
Trusted Contributor

Re: playing around

using echo instead of print, it works now.
James R. Ferguson
Acclaimed Contributor
Solution

Re: playing around

Hi Mark:

Another variation:

# #!/usr/bin/sh
clear
while true
do
for S in / \- \\ \| / \- \\ \|
do
echo "...${S}...\r\c"
sleep 1
done
done

...see the manpages for 'echo()'.

Regards!

...JRF...
Mark McDonald_2
Trusted Contributor

Re: playing around

Thnkas JRF

That was my next task - to get it to continue until a task had completed.

Mark McDonald_2
Trusted Contributor

Re: playing around

use echo instead of print.