- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:00 AM
11-21-2002 07:00 AM
Sometimes when you run an HP script like Q4 for example. you see the dotted lines running accross the page until the procedure finishes.
like '................................................... processing completed.'
Does anyone know how this is scripted? I can echo a line of 'dots'. but I can not get them to proceed one after another. Like I said , not real important, its just bugging me because I can't figure out how to do it.
TIA,
B.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:03 AM
11-21-2002 07:03 AM
Re: Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:04 AM
11-21-2002 07:04 AM
Re: Scripting
Lots of scripts do it like this:
echo ".\c"
The \c tells 'echo' not to append a new-line character at the end of the line. Put that in a loop and you have your dots.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:16 AM
11-21-2002 07:16 AM
Re: Scripting
#!/opt/bin/perl
$| = 1;
@mark = qw{ / | \ - };
$i = 100;
while ($i--) {
print $mark[$i % 4], "\r";
for (1..0x5ffff) { 1 } # delay
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:26 AM
11-21-2002 07:26 AM
Re: Scripting
you could do something like
echo "^H|\c"; sleep 1; echo "^H/\c"; sleep 1 ; echo "^H-\c" and so on.
Put this in a extra script in a loop an run it in the background.
This should give you the rotating slash.
Hope this helps
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:42 AM
11-21-2002 07:42 AM
Re: Scripting
And here is a 'launcher' ...
A - sh script called rotate.sh :
#!/usr/bin/sh
while :
do
echo '\\'"\r\c"
sleep 1
echo "|\r\c"
sleep 1
echo "/\r\c"
sleep 1
echo "-\r\c"
sleep 1
done
B - sh script 'go.sh' :
#!/usr/bin/sh
trap 'kill $I ; exit $R' 0 1 2 3 15
rotate.sh &
I=$!
$*
R=$?
C - try it for example using :
go.sh du -ks /usr
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:44 AM
11-21-2002 07:44 AM
Re: Scripting
#!/bin/sh
CHAR[0]="|"
CHAR[1]="/"
CHAR[2]="-"
CHAR[3]="\\"
let I=0
print -n " "
while true
do
let N=I%4
let I=I+1
print -n "\010${CHAR[N]}"
sleep 1
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:56 AM
11-21-2002 07:56 AM
Re: Scripting
You could have at least have taken the trouble to change some of the variable names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:34 AM
11-21-2002 08:34 AM
Re: Scripting
Imitation is the sincerest form of flattery. Besides, with the timestamp bug on the forum, how do we know you were really first? :)
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:34 AM
11-21-2002 08:34 AM
Re: Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:39 AM
11-21-2002 08:39 AM
Re: Scripting
Regards,
John
part.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 09:05 AM
11-21-2002 09:05 AM
Re: Scripting
Check this one out..
works for me!!
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x276e50011d20d6118ff40090279cd0f9,00.html
Later,
Bill
Nice one jimmy!!