Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Adding Filename as column using sed Post 302561191 by Shell_Life on Monday 3rd of October 2011 12:20:18 PM
Old 10-03-2011
Please specify the input and desired output.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to adding the filename into file contents

Dear Experts, Please help to teach me how to add the filename into the file content so that i can get the output below:- Actually the file name ***************New output that I want*************** =====2005-11-12===== EVENTS-20050912 03:33:37 ALARM: BTSSPAN-277-1 30-18013... (2 Replies)
Discussion started by: missutoomuch
2 Replies

2. Shell Programming and Scripting

Adding filename into file content

Dear Experts, Please help to teach me how to add the filename into the file content. Actually the file name are EVENTS-20050912. ***************New output that I want*************** EVENTS-20050912 03:33:37 ALARM: BTSSPAN-277-1 30-18013 EVENTS-20050912 12:10:28 ALARM: BTSSPAN-297-2... (1 Reply)
Discussion started by: missutoomuch
1 Replies

3. Shell Programming and Scripting

sed/awk-adding numeric to a column

I have a txt file as follows Code: Oct 1 file1 4144 Oct 1 file23 5170 Oct 2 file5 3434 Oct 21 file56 2343 I need to add a new column by marking the right log file from current directory. For example populate like this. Please not in the second columt for "1" it has... (2 Replies)
Discussion started by: gubbu
2 Replies

4. Shell Programming and Scripting

Help with adding leading zeros to a filename

Hi i need help in adding leading zero to filenames e.g file name in my folder are 1_234sd.txt 23_234sd.txt the output i need is 001_234sd.txt 023_234sd.txt can i do this shell scripting please help (2 Replies)
Discussion started by: rsmpk
2 Replies

5. Shell Programming and Scripting

Adding filename to each line of the file

Hi, I am a relative new bee in scripting. I need to develop a script such that the code would iterate through each file in a source directory and append every line of the file with '|' and the corresponding file filename. eg INPUT file IF927_1.dat - H|abc... (4 Replies)
Discussion started by: scripting_newbe
4 Replies

6. Linux

Adding a prefix to a column using awk/sed commands

Hello, I am a newbie to linux and struggling to find a better way to append a column in a text file. Here is the file i want to modify: It has 8 columns (and thousands of rows). I want to append the first column by adding "chr" infront of the numbers. Some rows have a string in the first... (4 Replies)
Discussion started by: bjorngill
4 Replies

7. Shell Programming and Scripting

Rename a header column by adding another column entry to the header column name URGENT!!

Hi All, I have a file example.csv which looks like this GrpID,TargetID,Signal,Avg_Num CSCH74_1_1,2007,61,256 CSCH74_1_1,212007,647,679 CSCH74_1_1,12007,3,32 CSCH74_1_1,207,299,777 I want the output as GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num CSCH74_1_1,2007,61,256... (4 Replies)
Discussion started by: Vavad
4 Replies

8. Shell Programming and Scripting

Adding Previous Month To Filename

Dear experts, I'm using solaris 5.10 and bash. I want to zip file "Amount.txt" to "Amount.zip" and rename it to "Amount_<prev_month>_<this year>.zip". For example, file for this month should be renamed to "Amount_06_2012.zip", for next month it should be "Amount_07_2012.zip". I have no problem... (8 Replies)
Discussion started by: kris.adrianto
8 Replies

9. Shell Programming and Scripting

Adding values of a column based on another column

Hello, I have a data such as this: ENSGALG00000000189 329 G A 4 2 0 ENSGALG00000000189 518 T C 5 1 0 ENSGALG00000000189 1104 G A 5 1 0 ENSGALG00000000187 3687 G T 5 1 0 ENSGALG00000000187 4533 A T 4 2 0 ENSGALG00000000233 5811 T C 4 2 0 ENSGALG00000000233 5998 C A 5 1 0 I want to... (3 Replies)
Discussion started by: Homa
3 Replies

10. Shell Programming and Scripting

Adding timestap to filename using perl

Hello, I am trying to create a file in windows and i want the filename to have timestamp as well but something is wrong and i can not understand waht. The code that i use is the following ($cwkday,$cmonth,$cday,$ctime,$cyear) = split(/\s+/, localtime); $current_date =... (5 Replies)
Discussion started by: chriss_58
5 Replies
META2TGA(1)						      General Commands Manual						       META2TGA(1)

NAME
meta2tga - convert metafile to Targa image format SYNOPSIS
meta2tga [ -c | -r ][ -x width ][ -y height ][ -m minrad ][ -o outname ] file .. DESCRIPTION
Meta2tga reads each metafile file in sequence and converts it to a compressed, color-mapped Targa file. The result is sent to the standard output (which must be redirected) unless the -o option is used. The argument to the -o option specifies the base file name, to which a page number and ".tga" is added as a suffix. Note that this option must be present in order to produce more than a single page of output. The default output resolution is 400 by 400, but a different resolution can be given with the -x and -y options. The -m option can be used to set a minimum value for the line radius in pixels. This may be helpful for improving the readability of high resolution output. The default value is 0, which allows lines of one pixel thickness. If the option -c is specified, the input files are only conditioned for output, ie. expanded (see pexpand). This is useful if many copies of the same output is desired. If the option -r is instead specified, the input is assumed already to be conditioned. If no input files are specified, the standard input is read. EXAMPLE
To convert the plots examp1.plt and examp2.plt to 1024x1024 Targa files: bgraph examp1.plt examp2.plt | meta2tga -o examp -x 1024 -y 1024 FILES
see pexpand(1) and psort(1) AUTHOR
Greg Ward SEE ALSO
bgraph(1), igraph(1), meta2bmp(1), pexpand(1), psmeta(1), psort(1), ra_t8(1) RADIANCE
6/24/98 META2TGA(1)
All times are GMT -4. The time now is 11:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy