LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-06-2006, 05:32 PM   #1
krock923
Member
 
Registered: Jul 2004
Posts: 171

Rep: Reputation: 30
Formatting output


Hi there, I have a script that telnets into a bunch of switches (using expect) and then outputs the results so that i'm left with an ugly looking text file. I'd like to format this to be publishable under our dokuwiki documentation system (it can just sick the formatted output onto the webserver) but I'm not having much luck. The way I'm trying to do it has sed and cut and grep all over the place with a slew of temporary text files. It's getting ugly. How should I go about this?
 
Old 06-07-2006, 02:44 AM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,067

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Usually AWK is your friend here. I have seen you don't mention is. The manual is here. It takes a few hours learning time, but it is well spent.

jlinkels
 
Old 06-07-2006, 07:26 AM   #3
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
hi there,
for columns style files i strong recommend
Code:
man pr
regards,
slackie1000
 
  


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
formatting date output grob115 Linux - Newbie 2 01-28-2006 08:03 AM
CLI....ls (or similar command)...formatting output Basslord1124 Linux - Newbie 2 02-27-2005 05:13 PM
Formatting output of ls doodar Linux - Newbie 29 07-29-2004 01:25 PM
Bash Select Function: Formatting Output mooreted Linux - General 2 03-28-2004 06:26 AM
need hlp formatting output from ls test* Evan P. Programming 1 11-06-2003 08:40 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration