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 > 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 and shell scripting languages 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 05:12 AM
How to execute multiple commands via ssh srage Shell Programming and Scripting 9 01-05-2008 03:18 AM
how do i get my script to execute multiple commands? hvincent Shell Programming and Scripting 1 04-26-2006 08:19 AM
multiple sed commands george_ Shell Programming and Scripting 5 03-30-2006 10:35 AM
Alias confusion - multiple commands ? HikerLT UNIX for Dummies Questions & Answers 1 11-17-2003 12:01 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 05-09-2005
cdunavent cdunavent is offline
Registered User
  
 

Join Date: Sep 2001
Location: D.C.
Posts: 54
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
  #2 (permalink)  
Old 05-09-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
See the man page for the printf command.
  #3 (permalink)  
Old 05-09-2005
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,408
echo $(date;pwd;hostname)
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 03:00 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