LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2009, 01:12 AM   #1
tux.amit
LQ Newbie
 
Registered: Sep 2009
Posts: 17

Rep: Reputation: 0
horizontal formatation


I have to creating shell script for taking log report of my newly created sms server and by using awk grep and other command i got the following which satisfy our need


2009-12-22 13:30:33 Sender is ashu@xxxxsgroup.in
2009-12-22 13:30:33 Sending to 0xxxx283738
2009-12-22 13:30:38 status of message is ATZ

2009-12-22 13:30:38 Sending to 0xxxx8583685
2009-12-22 13:30:43 status of message is ATZ
2009-12-22 13:30:44 Sending to xxxx067998
2009-12-22 13:30:49 status of message is ATZ
2009-12-22 13:38:22 Sender is ashu@xxxxxsgroup.in
2009-12-22 13:38:22 Sending to xxxx83685
2009-12-22 13:38:27 status of message is ATZ
2009-12-22 15:06:57 Sender is user1@xxxxxxgroup.in
2009-12-22 15:06:57 Sending to 09958583685
2009-12-22 15:08:03 Sender is user1@xxxxxxgroup.in
2009-12-22 15:08:03 Sending to xxxxx8583685
2009-12-22 15:09:19 Sender is user1@xxxxxxgroup.in
2009-12-22 15:09:19 Sending to 0xxx8583685
2009-12-22 15:09:24 status of message is ATZ

but the thing is i want it to be in excel format that means like
the first three lines which has time date sender sending to and status in one line

and than other three in one line excluding 2 and 3 lines date and time because we already have by first line like eg.
this
2009-12-22 13:30:33 Sender is ashu@xxxxsgroup.in Sending to 0xxxx283738 status of message is ATZ


thanks in advanced
 
Old 12-22-2009, 01:27 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
What have you thought of or tried so far?

You might get more replies with a more meaningful title (you can change it via Edit and "Go Advanced") like "bash: how to get data from log file?".

There have been many similar threads. Have you tried searching LQ using keywords like bash, shell, script, log, lines, read ... ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Horizontal scrolling cdhgee Linux - Hardware 4 03-11-2008 10:52 AM
GTK horizontal list; help!!! aXoneX Programming 0 06-28-2004 08:19 PM
Horizontal and vertical refresh sharpie General 5 01-24-2004 08:17 PM
Horizontal Length rch LQ Suggestions & Feedback 1 05-16-2003 04:21 AM
Horizontal GKrellM Plugins... Thymox Linux - Software 5 08-14-2002 06:07 PM


All times are GMT -5. The time now is 06:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration