Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 06-06-2006, 05:32 PM   #1
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
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,610

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

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

Rep: Reputation: 46
hi there,
for columns style files i strong recommend
man pr


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 (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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:58 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration