anyway of shortening the following?
From: William (fred_at_nosmapherethankyou.com)
Date: 06/07/05
- Next message: Eric Moors: "Re: Finding symbolic links that are outside a tree.."
- Previous message: christrier: "Re: diff output"
- Next in thread: RolandRB: "Re: anyway of shortening the following?"
- Reply: RolandRB: "Re: anyway of shortening the following?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 7 Jun 2005 09:16:54 +0000 (UTC)
Hi all,
Can the following be shortened in any way to achieve the same output?
uptime | awk '{print "Uptime information for this Host: " $2, $3,
$4,"since: " $5}' | sed 's/[,/]//'g
Uptime information for this Host: up 48 day(s) since: 22:31
I'd also like to, (if possible?) replace "Host" in the output with a either
a declared variable or by running the `hostname` command in Solaris within a
script.
HOST=`hostname`
echo `hostname`
-- Regards William
- Next message: Eric Moors: "Re: Finding symbolic links that are outside a tree.."
- Previous message: christrier: "Re: diff output"
- Next in thread: RolandRB: "Re: anyway of shortening the following?"
- Reply: RolandRB: "Re: anyway of shortening the following?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|