- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- show all files with highliten one
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
05-14-2009 12:00 AM
05-14-2009 12:00 AM
cat $edTmp |
while read line
do
err=`echo $line | awk '{print $5}'`
if [[ $err>"70%" && $err <="90%" ]]
then
echo "\033[0;31m$line \033[0;39m"
fi
done
Note: edTmp is a formatted output of bdf command.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2009 12:43 AM
05-14-2009 12:43 AM
Re: show all files with highliten one
Please download this file (bdfmesg) from below link you will find this is a great tool written by Mr.Bill Hassell.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1326767
Just give
#bdfmesg -P 80 ##to find all file system which is using 80 or more then 80
Like so many output you can take from bdfmesg
Many Thanks to Mr.Bill Hassell to create a nice and useful tool.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2009 01:02 AM
05-14-2009 01:02 AM
Re: show all files with highliten one
I have this script and no doubt its a good tool. But i need my exact solution to get rid of the scripting problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2009 01:46 AM
05-14-2009 01:46 AM
SolutionTo display the other lines too, the if...then...fi condition in the script needs an "else" clause. In other words, the logic within the loop should be:
IF [value between 70% and 90%]
THEN echo the line with color codes
ELSE echo the line without color codes
FI
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2009 04:08 AM
05-14-2009 04:08 AM
Re: show all files with highliten one
To add to Matti's directions, in order to retain the formating (spacing) you have in the colored lines, be sure to do your 'echo' of the non-colored ones in double quotes, too:
if [[ $err>"70%" && $err <="90%" ]]; then
echo "\033[0;31m${line }\033[0;39m"
else
echo "${line}"
fi
...That said, you can also eliminate the extra 'cat' process:
while read line
do
err=`echo $line | awk '{print $5}'`
if [[ $err>"40%" && $err <="90%" ]]; then
echo "\033[0;31m${line} \033[0;39m"
else
echo "${line}"
fi
done < ${edTmp}
...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2009 08:31 PM
05-19-2009 08:31 PM