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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
make multiple line containing a pattern into single line VTAWKVT Shell Programming and Scripting 13 12-04-2008 06:40 PM
single line input to multiple line output with sed mitch Shell Programming and Scripting 8 07-16-2008 02:57 PM
Multi-line output to single line LinuxRacr Shell Programming and Scripting 7 02-26-2008 10:05 AM
Create two line from single line in shell unishiva Shell Programming and Scripting 2 11-03-2007 12:28 AM
reading a single line rochitsharma Shell Programming and Scripting 2 02-27-2006 01:06 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-05-2008
Prat007 Prat007 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 20
Thumbs up How to get it in single line. pls help

Hi,
when i am executing this script, i am getting the values of TID and Intime in different lines.
How can i print both output values in a single line. please advise

_____________________________
#!/bin/ksh
export Path="/abc/def/ghi";
Home="/abc/jkl/prt";
cd $Path
cat $Home | while read line
do
TID=$(echo $line|awk '{print $4}');
Intime=$(ls -ltr | grep $TID | awk '{print $8}')
print $line
print $Intime
done
______________
Output : Prateek
12:15
Desired outpt : Prateek 12:15
------------------
Thanks in Advance
 

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 08:00 AM.


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