- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: diff comand
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
10-29-2009 12:36 PM
10-29-2009 12:36 PM
diff comand
is correct this code?
i mean, i am not sure in the code of diff command into the "if"
if [ `diff ${b}_base.log ${b}_m.log` ]
then
mailx -s "Hi - `date "+%Y%m%d"` " $correos < ${ruta_monitor}/${b}_m.log
mv ${b}_m.log ${b}_base.log
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2009 12:36 PM
10-29-2009 12:36 PM
Re: diff comand
$ ./uno.sh
./uno.sh[106]: <: unknown test operator
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2009 12:47 PM
10-29-2009 12:47 PM
Re: diff comand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2009 12:52 PM
10-29-2009 12:52 PM
Re: diff comand
WRONG:
if [ `diff ${b}_base.log ${b}_m.log` ]
GOOD AND WORKING:
if diff ${b}_base.log ${b}_m.log >/dev/null
then
-----
-----
----
fi
THANKS ANYWAY
I SAW THAT IN:
http://www.felixgers.de/teaching/shells/exercise_shells.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2009 12:52 PM
10-29-2009 12:52 PM
Re: diff comand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2009 01:41 AM
10-30-2009 01:41 AM
Re: diff comand
>if diff ${b}_base.log ${b}_m.log >/dev/null
then
You can also snag the status:
diff ${b}_base.log ${b}_m.log > TMP
if [ $? -eq -0 ]; then
echo "files match"
else
echo "files differ:"
cat TMP
fi