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
Split line before the pattern djanu Shell Programming and Scripting 7 10-17-2008 07:39 AM
line 3: syntax error near unexpected token `(' camzio UNIX Desktop for Dummies Questions & Answers 4 09-29-2008 11:10 AM
split line when found newline HAA Shell Programming and Scripting 2 11-19-2007 11:34 AM
Split a huge line into multiple 120 characters lines with sed? jerome_1664 Shell Programming and Scripting 2 08-17-2006 01:03 PM
sed help split line Raom UNIX for Advanced & Expert Users 5 01-30-2006 01:39 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 12-03-2008
cesarNZ cesarNZ is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 70
split a line using a token

hi all,
is ksh, is there a way to split a line so it displays the output on seperate lines from a grep command ??

i have a script which greps for "responseTime" from log files but when i echo the output of the grep command it displays all occurances of the string all on one line which is hard to read.


i.e it currently displays this :

[12/4/08 16:18:31:298 NZDT] 4c4a8d responseTime [307 millis] [12/4/08 16:19:47:005 NZDT] 1affb08 responseTime[692 millis] [12/4/08 16:19:47:416 NZDT] 1affb08 responseTime[692 millis]


and i wanted to display it in this way :

[12/4/08 16:18:31:298 NZDT] 4c4a8d responseTime [307 millis]
[12/4/08 16:19:47:005 NZDT] 1affb08 responseTime[692 millis]
[12/4/08 16:19:47:416 NZDT]1affb08 responseTime[692 millis]



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 09:08 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