Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Shell Script Problems, Lose formatting when copy pasting from formatted file.
post Aug 14 2011, 08:38 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 14-August 11
Member No.: 15,519


I'm having trouble with formatting some text via the terminal. I can get it perfectly formatted, but when I try and copy paste the text from the output file it loses it's formatting. Very frustrating!

Basically I have 7 files (data data2 data3 data4 data5 data6 data7) containing a column of information each. I merge them all into one output file, with a separate column for each input file using:

paste data data2 data3 data4 data5 data6 data7 | awk '{printf "%-12s%-12s%-12s%-12s%-12s%-12s%-12s\n", $1, $2, $3, $4, $5, $6, $7}' > output

The result looks good in the output file and when the output is displayed in the Terminal, but when I copy paste from the output file into another file the columns become all jumbled.

I've also tried:
pr -m -t data data2 data3 data4 data5 data6 data7 >| expand > output

I have no idea what to do to solve this, any help would be greatly appreciated.

Go to the top of the page
+Quote Post

Posts in this topic
- facetoe   Shell Script Problems   Aug 14 2011, 08:38 PM
- - michaelk   What editor are you using?   Aug 15 2011, 04:31 AM
- - xeron   Understand it.   Oct 21 2011, 11:38 PM

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 21st July 2018 - 10:47 AM