Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-22-2009, 01:12 AM   #1
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
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
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
2009-12-22 15:06:57 Sending to 09958583685
2009-12-22 15:08:03 Sender is
2009-12-22 15:08:03 Sending to xxxxx8583685
2009-12-22 15:09:19 Sender is
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.
2009-12-22 13:30:33 Sender is Sending to 0xxxx283738 status of message is ATZ

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

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
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 ... ?


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:54 AM.

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