- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell 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
09-13-2001 06:46 PM
09-13-2001 06:46 PM
The input file has 2 fields like say,
a b
abc xyz
The following script is not useful in this case.
for i in `cat $in_file|awk '{print $1}'`
do
command -a $i -b ?
done
Can you suggest a method to overcome this situation.
Thanks
Jayant
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 06:57 PM
09-13-2001 06:57 PM
SolutionI am afraid i don't fully understand your question, but i'll try.
cat $in_file | while read COL1 COL2
do
command -a $COL1 -b $COL2
done
this will read two variables from the file "$in_file" and store it in $COl1 and $COL2 and for each line in the file execute the command.
Is this what you were trying to do?
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 07:23 PM
09-13-2001 07:23 PM
Re: Shell Scripting
with diffent options that and you want the out put for each options. lets do something like this. ..
echo '-a option'
command -a >> file.txt
echo '####'
echo '-b option'
command -b >> file.txt
and so on ..
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 07:30 PM
09-13-2001 07:30 PM
Re: Shell Scripting
Can you give me an example of a simple command that I can run with options like you said so I can see the output?
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 07:50 PM
09-13-2001 07:50 PM
Re: Shell Scripting
Your suggestion was helpful.
Regards
Jayant