Sponsored Content
Top Forums UNIX for Dummies Questions & Answers transponse row to coloumn output Post 302600407 by Scrutinizer on Tuesday 21st of February 2012 04:09:41 AM
Old 02-21-2012
Try:
Code:
awk -F': ' '/^=/{print p ORS q ORS $0;p=q=x;next}{p=p $1 FS;q=q $2 OFS}' infile

-or-
Code:
awk -F ': ' 'NR==1{next}/^=/{print p ORS q ORS $0;p=q=x;next}{p=p $1 FS;q=q $2 OFS}' infile


Last edited by Scrutinizer; 02-21-2012 at 05:15 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How To display second coloumn values

i have a file like this ..... empno ----- ename ----- job 1 ----- scott----- manager 2----- ford----- salesman 3 ----- mark---- president in this i wanna display second column means ename... (6 Replies)
Discussion started by: naughty21
6 Replies

2. Shell Programming and Scripting

Extend the Output length of a row

hi all, I use shell script to fetch some data's from my sybase database and i redirect my output to a file , i have some disorder in my file.my current o/p file looks like, firstrecord|secondrecord|thirdrecord|fourthrecord|fivthrecord|s ixhrecord|seventhrecord| ... (10 Replies)
Discussion started by: ulin
10 Replies

3. UNIX for Dummies Questions & Answers

How to copy one coloumn from one file to another

Hi All, I have two files in which i want to copy one coloumn from one file to another such that it appears as a separate coloumn in the other file.Please note there already exists a coloumn in the other file.For eg in file 1(first file) i have 12 23 35 in file 2(other file) i have 34 45... (2 Replies)
Discussion started by: navjotsingh
2 Replies

4. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

5. Shell Programming and Scripting

convert a column to row output?

Getting tired of cut-and-paste...so I thought I would post a question. how do I change this column output to a single row? from this: # vgdisplay -v /dev/vgeva05 | grep dsk | awk '{print $3}' /dev/dsk/c6t0d5 /dev/dsk/c11t0d5 /dev/dsk/c15t0d5 /dev/dsk/c18t0d5 /dev/dsk/c7t0d5... (8 Replies)
Discussion started by: mr_manny
8 Replies

6. Shell Programming and Scripting

Column to row output

Hello All, i have a file with the contents like shown below Name = POLICY1 Selected = 1 Written = 0 Name = POLICY2 Selected = 6 Written = 8 Name = POLICY3 Selected = 4 Written = 26 I want the output to be... (5 Replies)
Discussion started by: vinredmac
5 Replies

7. Shell Programming and Scripting

Output mean and standard deviation of a row

I have a file that looks that this: 820 890 530 1650 1600 1800 1850 1900 2270 1640 2300 1670 2080 2200 2350 1150 1630 2210 I would like to output the mean and standard deviation of each row so that my final output would look like this 820 890 530 746.667 155.849 1650 1600 1800... (5 Replies)
Discussion started by: kayak
5 Replies

8. Shell Programming and Scripting

Output Row if Third Column is Larger

Hi, I am fairly new to Unix scripting. We are running Solaris 5.10. I have the following question: Assume a text file with one text column, followed by 2 integer columns. How would I generate a script or, preferably, a command that will output the rows in which the value of the third... (6 Replies)
Discussion started by: QZ1
6 Replies

9. Shell Programming and Scripting

Transpose the 2nd coloumn in every fourth row three times....

I have several csv files, each hundreds of rows with the following layout "","SEQ ID No. 1 Subject # 20" "BPM neg.:",68.83 "BPM normal:",68.48 "SEQ ID No. 1 Subject # 20",79.33 "","SEQ ID No. 10 Subject # 20" "BPM neg.:",68.05 "BPM normal:",68.58 "SEQ ID No. 10 Subject # 20",81.63... (6 Replies)
Discussion started by: bertbrutzel
6 Replies

10. Shell Programming and Scripting

How do we display specific row of an output from bottom given line number?

I pass a number to my script. Passing "1" below. ./getfile.sh 1 echo "User entered: $1" ls -ltr *.conf | sed -n '$p' I wish to use ls -ltr i.e list files in ascending order of time the latest showing at the bottom of the output. Number 1 should get me the last row of ls -ltr output i.e... (9 Replies)
Discussion started by: mohtashims
9 Replies
Jifty::Web::Session::ApacheSession(3pm) 		User Contributed Perl Documentation		   Jifty::Web::Session::ApacheSession(3pm)

NAME
Jifty::Web::Session::ApacheSession - Jifty Sessions based on Apache::Session SYNOPSIS
In your etc/config.yml, using the Apache::Session::File backend: framework: Web: SessionClass: Jifty::Web::Session::ApacheSession SessionBackend: File SessionOptions: Directory: /tmp/sessions LockDirectory: /var/lock/sessions Or with Apache::Session::Memorycached backend: framework: Web: SessionClass: Jifty::Web::Session::ApacheSession SessionBackend: Memorycached SessionOptions: { servers: [ '127.0.0.1:11211' ] } new Returns a new, empty session handler, subclassing Jifty::Web::Session. id Returns the session's id if it has been loaded, or "undef" otherwise. create Creates a new session. load [ID] Load up the current session from the given "ID", or the appropriate cookie (see "cookie_name" in Jifty::Web::Session) otherwise. If both of those fail, creates a session in memory. get KEY [TYPE] See "get" in Jifty::Web::Session. set KEY => VALUE, [TYPE] See "set" in Jifty::Web::Session. remove KEY, [TYPE] See "remove" in Jifty::Web::Session. remove_all See "remove_all" in Jifty::Web::Session. continuations See "continuations" in Jifty::Web::Session. perl v5.14.2 2010-09-25 Jifty::Web::Session::ApacheSession(3pm)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy