- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Basic script issue
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
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
06-12-2008 09:12 AM
06-12-2008 09:12 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2008 09:21 AM
06-12-2008 09:21 AM
Re: Basic script issue
For the sake of the example, assume that the input file has whitespace-delimited fields of a tapename and a tape number, like:
# cat ./inputlist
full_080603 789
increm_080604 900
increm_080605 877
...then, something like:
#!/usr/bin/sh
while read NAME SERIAL X
do
echo "${NAME} available"
done < inputlist
...will work...
The 'X' field will gobble up any fields that follow the 'SERIAL' field if is should exist. If the extent of what you want is just the 'NAME' then just write:
while read NAME X
...for the same reason.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2008 09:22 AM
06-12-2008 09:22 AM
Re: Basic script issue
for MEDIA in `cat medialist`
do
tar -xvf $MEDIA
done
I used tar since you didn't specify.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2008 09:37 AM
06-12-2008 09:37 AM
Re: Basic script issue
xxxxx
The program can read only tape at a time. I know the answer is simple, but it escapes me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2008 07:23 PM
06-12-2008 07:23 PM
Re: Basic script issue
talking about, but it's far from clear to me.
I freely admit that my psychic powers are
weak.
Perhaps you could show what's in your "file
consisting of vsn", and what the resulting
command(s) you'd like generate would look
like. Given some actual information, you can
almost certainly find someone who can write
a script to do what you want. Given no
useful information, all you'll get will be a
lot of guesswork, which may be of limited
value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2008 08:01 PM
06-12-2008 08:01 PM
Re: Basic script issue
xxxxx
You need to make this simpler. Is it:
XXX VVVV YYY
Where you want to just extract the VVVV field?
If so, you change JRF's script to:
while read X VSN X; do
echo "${VSN} available"
done < inputlist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2008 04:31 AM
06-13-2008 04:31 AM
Re: Basic script issue
000001
000002
000003
A tower list of vsn's only. I am looking for a script that will read those vsn(s) into the following command:
bpmedia -movedb -ev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2008 04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2008 04:41 AM
06-13-2008 04:41 AM
Re: Basic script issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2008 04:41 AM
06-13-2008 04:41 AM