GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Error handling in shellscript
Operating System - HP-UX
1846634
Members
1788
Online
110256
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-02-2010 05:33 PM
03-02-2010 05:33 PM
Error handling in shellscript
I have written shell script to find out pairsuspends in our environment.But when i run the script iam getting an error for the Pair which are not active.Below are the error am getting
pairvolchk -g up1012 -I11
pairvolchk : execution error.
pairvolchk: [EX_ENQCTG] Unmatched CTGID within the group
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details
How could i avoid those errors while running script.Below are the ouput while running the script
./checkpair.sh 11
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENQCTG] Unmatched CTGID within the group
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENQCTG] Unmatched CTGID within the group
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk -g up1012 -I11
pairvolchk : execution error.
pairvolchk: [EX_ENQCTG] Unmatched CTGID within the group
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details
How could i avoid those errors while running script.Below are the ouput while running the script
./checkpair.sh 11
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENLDEV] No such LDEV within the RAID
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENQCTG] Unmatched CTGID within the group
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
pairvolchk : execution error.
pairvolchk: [EX_ENQCTG] Unmatched CTGID within the group
Refer to the command log(/HORCM/log11/horcc_fauna.log) for details.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2010 05:45 PM
03-02-2010 05:45 PM
Re: Error handling in shellscript
Hi,
You can redirect your error
./my_script > file <-- Redirect standard output
./my_script 2> file <-- Redirect error output
./my_script &> file <-- Redirect all output
see the examples
Ex: ./my_script &> capture.txt
for more details see the below link
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_07
Suraj
You can redirect your error
./my_script > file <-- Redirect standard output
./my_script 2> file <-- Redirect error output
./my_script &> file <-- Redirect all output
see the examples
Ex: ./my_script &> capture.txt
for more details see the below link
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_07
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2010 05:51 PM
03-02-2010 05:51 PM
Re: Error handling in shellscript
Suraj
Thanks for the response.i have redirecting some of the outputs to the file.Below are the details
cat /etc/horcm$1.conf | grep -i flo |grep -v ^# |awk '{print $1}'> ${LogDir}/horcm$1.out
for i in `cat $LogDir/horcm$1.out`
do
echo $i `pairvolchk -g $i -I$1` >> /tmp/offshore/out/$1.out
done
Thanks for the response.i have redirecting some of the outputs to the file.Below are the details
cat /etc/horcm$1.conf | grep -i flo |grep -v ^# |awk '{print $1}'> ${LogDir}/horcm$1.out
for i in `cat $LogDir/horcm$1.out`
do
echo $i `pairvolchk -g $i -I$1` >> /tmp/offshore/out/$1.out
done
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP