The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to ssh to different server and get some info am_yadav Shell Programming and Scripting 2 02-01-2008 02:00 AM
trying to write a script to loop through a port info file rcon1 Shell Programming and Scripting 5 01-09-2008 02:59 AM
Return info from a called external script cathrop UNIX for Dummies Questions & Answers 1 11-01-2006 05:51 PM
possible to run script to enter info within a program? lianderthal Shell Programming and Scripting 1 06-09-2005 03:40 PM
I need a script that script extract info from mail meravd Shell Programming and Scripting 1 10-19-2004 08:15 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-20-2004
Registered User
 

Join Date: Jun 2004
Location: Italia - Napoli
Posts: 6
Stumble this Post!
sys info script

Hi,

i need a shell script that write in a file called sys.txt this:

<output of date command>
HN <host name>
OS <OS name> <OS version>

I can have this info with uname command, but I can't write these in sys.txt.

Can any one help me?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-20-2004
encrypted's Avatar
Registered User
 

Join Date: Feb 2004
Location: Oslo, Norway
Posts: 218
Stumble this Post!
Just a two liner:

#!/bin/bash
(date; hostname; uname -sv) > sys.txt

Cheers
rte
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0