Download your favorite Linux distribution at LQ ISO.
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 09-03-2013, 04:50 AM   #1
LQ Newbie
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
Want to transpose the text file content

Thanks in advance
Im trying to get shell script or perl to do below transpose of txt file

Input file:
caption 'BLR-2F04-PS1',
'ip_address' '',
'watt_hour' '1714360000',
'active_power' '1067',
'caption' 'BLR-3B04-PS2',
'ip_address' '',
'watt_hour' '6807120000',
'active_power' '3681',

I require output like below, please help out of this.

'caption' 'ip_address' 'watt_hour' 'apparent_power' 'active_power'
'BLR-2F04-PS1', '', '1714360000', '1089.6', '1067',
'BLR-3B04-PS2', '', '6807120000', '3690', '3681',

Thanks again
Old 09-03-2013, 06:18 AM   #2
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,401

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
So what have you tried so far? We're not here to do your homework assignment for you.


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
php script that reads content from text file adrianno2 Programming 3 07-21-2008 01:14 AM
How to open/popup a new window to display the content of specified text file use Gtk cy163 Programming 1 06-17-2007 03:13 PM
Replace text of unknown content with other text in file brian0918 Programming 15 07-14-2005 09:22 PM
Replace text of unknown content with other text in file brian0918 Linux - Software 1 07-14-2005 03:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:16 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