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
How do you delete multiple text from a comma delimited file dolo21taf Shell Programming and Scripting 1 02-20-2008 02:12 AM
How to execute multiple commands via ssh srage Shell Programming and Scripting 9 01-05-2008 12:18 AM
how do i get my script to execute multiple commands? hvincent Shell Programming and Scripting 1 04-26-2006 05:19 AM
multiple sed commands george_ Shell Programming and Scripting 5 03-30-2006 07:35 AM
Alias confusion - multiple commands ? HikerLT UNIX for Dummies Questions & Answers 1 11-17-2003 09:01 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 05-09-2005
Registered User
 

Join Date: Sep 2001
Location: D.C.
Posts: 50
Multiple commands TAB delimited

Hey guys...

Running Solaris 5.6, trying to write an easy /sbin/sh script. I want to run several commands, then have the results appear on one line. Additionally, I want the results to be separated by <TAB>.

Let's say that my script calls three commands (date, pwd, and hostname), I would want the results to look like this:

Mon May 9 12:56:12 EDT 2005 /usr/contrib FCIVRA

As opposed to this:

Mon May 9 12:56:12 EDT 2005
/usr/contrib
FCIVRA

Any ideas??

Thanks,
-cd
Reply With Quote
Forum Sponsor
  #2  
Old 05-09-2005
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
See the man page for the printf command.
Reply With Quote
  #3  
Old 05-09-2005
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,248
echo $(date;pwd;hostname)
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:23 PM.


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

Content Relevant URLs by vBSEO 3.2.0