- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scripting woes...
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-06-2001 06:07 PM
11-06-2001 06:07 PM
Here is a scripting problem I have. The expert
that I am in script writing (NOT!) gives me this problem and I am swapping out trying to think of the solution. The object of this exercise is to run a command to a logile. If the log file is empty continue to run the next command, if not exit and run the next chain, or have I got the whole thing wrong and should go back to school?
omnimm -list_scratch_media $POOL1 > $POOL_LOG
if (log file is empty, what is the syntax I use)
then
omnimm -move_medium $tape1 $POOL1
else
echo "Scratch Tape already available in $POOL1"
fi
TIA
-Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:21 PM
11-06-2001 06:21 PM
Re: Scripting woes...
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:24 PM
11-06-2001 06:24 PM
Re: Scripting woes...
if [[ -s logfile ]]
live free or die
harry
http://www.physik.uni-freiburg.de/cip/man.cgi?1 ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:26 PM
11-06-2001 06:26 PM
Re: Scripting woes...
if [! -s ${POOL_LOG} ]
# the size of the logfile is zero
See man test for details

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:26 PM
11-06-2001 06:26 PM
Re: Scripting woes...
if [[ ! -s $Logfile ]];then
echo "empty file"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:31 PM
11-06-2001 06:31 PM
Re: Scripting woes...
I think I have enough to stop swapping out. I probably need to add some more RAM or increase Buffer Cache!
Points to awarded as soon as test is complete!
Thanks again!
-Michael
(Never be afraid to ask, nobody knows everything!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:46 PM
11-06-2001 06:46 PM
Re: Scripting woes...
Maybe a "user < cold_beer" would do?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 07:23 PM
11-06-2001 07:23 PM
Re: Scripting woes...
Harry, how about this...
if [ ! -s ${FRIDGE} ]
then /usr/local/bin/different_fridge
else
echo "Dear I'm off to the pub!"
fi
and BTW was the school that I needed to attend
have a pre-requisite of knowing how to read
German?? :^))
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 07:27 PM
11-06-2001 07:27 PM
Re: Scripting woes...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 07:28 PM
11-06-2001 07:28 PM
Re: Scripting woes...
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 10:30 PM
11-06-2001 10:30 PM
Re: Scripting woes...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 10:32 PM
11-06-2001 10:32 PM
Re: Scripting woes...
