The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing a Shell Script igandu UNIX for Dummies Questions & Answers 4 08-17-2006 10:29 AM
Executing Sql Query Using Shell Script ragha81 Shell Programming and Scripting 14 07-31-2006 02:15 PM
Shell script is not executing dreams5617 UNIX for Advanced & Expert Users 5 08-20-2004 11:45 AM
Executing a SQL query from a shell script 98_1LE UNIX for Dummies Questions & Answers 3 03-23-2002 03:29 AM
Executing shell script with xp_cmdshell gerald_agoi UNIX for Advanced & Expert Users 2 10-10-2001 04:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-11-2007
HIMANI's Avatar
HIMANI HIMANI is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 20
executing uname through shell script

Hi,
I need to write a shell script that executes the command
uname -a

the output i get is of the format :
FreeBSD test.trial.machine.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Jan 28 14:31:56 GMT 2000 tester@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC i386

(this is all in a single line)
I need to read just the last word, that is i386

Please help.

Thanks,
Himani
  #2 (permalink)  
Old 10-11-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Run 'uname -i'. It will output just the hardware platform (in this case, i386).
  #3 (permalink)  
Old 10-11-2007
HIMANI's Avatar
HIMANI HIMANI is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 20
Hi,
i tried 'uname -i' but i get an error saying that its an illegal option ..
  #4 (permalink)  
Old 10-11-2007
HIMANI's Avatar
HIMANI HIMANI is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 20
hi,
its uname -m thats gives the hardware information.
thanks !!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0