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.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Shell Script Problems, Lose formatting when copy pasting from formatted file.
facetoe
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



Hello,

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
michaelk
post Aug 15 2011, 04:31 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



What editor are you using?
Go to the top of the page
 
+Quote Post
xeron
post Oct 21 2011, 11:38 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 21-October 11
Member No.: 15,641



Understand it.


--------------------
[url=http://www.xn--r3ce0ab1b.com/]ผลบอล[/url]-[url=http://www.sbobetsbobet.com/]sbobet[/url]-[url=http://www.xn--r3ce0ab1b.com/analyse_list.php]วิเคราะห์บอล[/url]-[url=http://www.xn--r3ce0ab1b.com/analyse_list.php]ทีเด็ดฟุตบอล[/url]-[url=http://www.xn--r3ce0ab1b.com/analyse_list.php]ทีเด็ด[/url]
Go to the top of the page
 
+Quote Post

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: 25th November 2017 - 04:19 AM