Sponsored Content
Full Discussion: Editing columns
Top Forums Shell Programming and Scripting Editing columns Post 302369353 by kylle345 on Saturday 7th of November 2009 05:14:36 PM
Old 11-07-2009
Editing columns

Hi, I have a file with a title for some rows but not all. I tried looking for examples of this but I am not sure what its called.

The file looks something like this:

Code:
name date 1 2 3
2 3 4
5 6 7
3 4 6
title author 1 3 5
2 3 5
2 3 2

Its hard to describe what I want to do with it but I want it to look like this:

Code:
name date 1 2 3
name date 2 3 4
name date 5 6 7
name date 3 4 6
title author 1 3 5
title author 2 3 5
title author 2 3 2

So basically adding the first two columns so the rows below until a different title appears...

kylle
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Single command for add 2 columns and remove 2 columns in unix/performance tuning

Hi all, I have created a script which adding two columns and removing two columns for all files. Filename: Cust_information_1200_201010.txt Source Data: "1","Cust information","123","106001","street","1-203 high street" "1","Cust information","124","105001","street","1-203 high street" ... (0 Replies)
Discussion started by: onesuri
0 Replies

2. UNIX for Advanced & Expert Users

Help in Deleting columns and Renaming Mutliple columns in a .Csv File

Hi All, i have a .Csv file in the below format startTime, endTime, delta, gName, rName, rNumber, m2239max, m2239min, m2239avg, m100016509avg, m100019240max, metric3min, m100019240avg, propValues 11-Mar-2012 00:00:00, 11-Mar-2012 00:05:00, 300.0, vma3550a, a-1_CPU Index<1>, 200237463, 0.0,... (9 Replies)
Discussion started by: mahi_mayu069
9 Replies

3. Shell Programming and Scripting

Combine columns from many files but keep them aligned in columns-shorter left column issue

Hello everyone, I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble. I have many files each having two columns and hundreds of rows. first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Discussion started by: isildur1234
5 Replies

4. Shell Programming and Scripting

Deleting all the fields(columns) from a .csv file if all rows in that columns are blanks

Hi Friends, I have come across some files where some of the columns don not have data. Key, Data1,Data2,Data3,Data4,Data5 A,5,6,,10,, A,3,4,,3,, B,1,,4,5,, B,2,,3,4,, If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies

5. Shell Programming and Scripting

Evaluate 2 columns, add sum IF two columns match on two rows

Hi all, I know this sounds suspiciously like a homework course; but, it is not. My goal is to take a file, and match my "ID" column to the "Date" column, if those conditions are true, add the total number of minutes worked and place it in this file, while not printing the original rows that I... (6 Replies)
Discussion started by: mtucker6784
6 Replies

6. UNIX for Dummies Questions & Answers

Help with editing columns

Hi, I have large file with 3 columns and want to output the 1st and 2nd column only. However I want the 2nd column to be edited like this: 14.036 to fx14 (notice the number in fx14 comes from the first two digits of 14.036) BEFORE: aran24352 14.036 14.036 aran08740 07.034 07.032... (3 Replies)
Discussion started by: narachaid
3 Replies

7. Shell Programming and Scripting

Compare 2 csv files by columns, then extract certain columns of matcing rows

Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns. I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
Discussion started by: bkane3
5 Replies

8. Shell Programming and Scripting

Request: How to Parse dynamic SQL query to pad extra columns to match the fixed number of columns

Hello All, I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns. So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Discussion started by: vikas_trl
7 Replies

9. Shell Programming and Scripting

Evaluate 2 columns, add sum IF two columns satisfy the condition

HI All, I'm embedding SQL query in Script which gives following output: Assignee Group Total ABC Group1 17 PQR Group2 5 PQR Group3 6 XYZ Group1 10 XYZ Group3 5 I have saved the above output in a file. How do i sum up the contents of this output so as to get following output: ... (4 Replies)
Discussion started by: Khushbu
4 Replies

10. Shell Programming and Scripting

Convert vi editing to text editing

Dear Guru's I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response. Srini (6 Replies)
Discussion started by: thummi9090
6 Replies
bookman(1)																bookman(1)

NAME
bookman - Generate a book from man pages SYNOPSIS
bookman [-pPxn] [-o outfile] [-a author] [-d date] [-r release] [-t title] [-v volume] [-c coverfile] [manfile] DESCRIPTION
bookman compiles a set of man pages files specified by manfile arguments, or if no manfile is given, filenames are read from standard input. OPTIONS
-p PDF output format. -P Postscript output format. -x X11 previewing, using gxditview(1). -n no format, output is direct gtroff intermediate format. -o outfile Output in file outfile. Default is standard output. -a author Set the author, on the cover page. -d date Set the date on the cover page. -r release Set the book name and release on the cover page. -t title Set the title on the cover page. -v volume Specify the name of the volume. -c coverfile Uses the file coverfile to generate the cover page, i.e. all pages preceding the table of content. coverfile must be in groff_ms(7) format. EXAMPLE
To build a reference manual from section 2 man, do: $ cd /usr/man/man2 $ bookman -p -t 'Unix Reference Manual' * >book.pdf SEE ALSO
man(1), mandoc(7), groff_ms(7), groff(1), troff(1), grops(1), gxditview(1), ps2pdf(1). AUTHOR
Marc Vertes <mvertes@free.fr> txt2man-1.5.5 11 April 2011 bookman(1)
All times are GMT -4. The time now is 05:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy