Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Changing display and format of file Post 302220999 by p50p100 on Saturday 2nd of August 2008 08:12:45 PM
Old 08-02-2008
Firstly, please create file below:

a 601 602 603
b 601
c 610 615
d 601 603 612

Secondary, please use "join" command:

a 601 601 602 603
a 602 601 602 603
a 603 601 602 603
b 601 601
c 610 610 615
c 615 610 615
d 601 601 603 612
d 603 601 603 612
d 612 601 603 612

Thirdly, please replace 1st word and 2nd word.

Forthly, please delete same word as 1st word.

It's my idea. One step is easy.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

changing the format of CSV file

Hi Experts, Please help me to get the following from script for Unix ENvironment(shell, perl, tr, sed, awk). INPUT FILE: 20K,ME,592971 20K,YOU,2 20K,HE,1244998 50K,YOU,480110 50K,ME,17 50K,HIS,10 50K,HE,1370391 OUTPUT FILE: K,ME,YOU,HE,HIS 20K,592971,2,1244998,0... (5 Replies)
Discussion started by: ashis.tewari
5 Replies

2. Shell Programming and Scripting

Changing the text file format

Hi, I have a shell script to unload all the empname who have salary >50000 from the emp table into a text file(empname.txt) . m_db unload "$dbc_file" -column_delimiter ',' -select "SELECT empname FROM emp where salary > 50000" >> empname.txt Now my text file have data in the following format ... (3 Replies)
Discussion started by: kavithakuttyk
3 Replies

3. Shell Programming and Scripting

how I can add a constant to a field without changing the file format

Hi, I need to edit a file Protein Data Bank (pdb) and then open that file with the program VMD but when I edit the file with awk, it changes pdb format and the VMD program can not read it. I need to subtract 34 to field 6 ($ 6). this is a pdb file : ATOM 918 N GLY B 103 -11.855 8.675... (8 Replies)
Discussion started by: bio_
8 Replies

4. Shell Programming and Scripting

Changing display format

Hi, My file cat a.txt Sat Nov 27 00:02:00 2010 00:02:00 Usr 27: Login by edi on batch. (452) 00:02:09 Usr 27: Logout by on batch. (453) 00:02:09 Usr 27: Login by edi on batch. (452) 00:02:22 Usr 27: Logout by on batch. (453) 00:02:22 Usr 27: Login by edi on batch.... (3 Replies)
Discussion started by: ganeshanbu
3 Replies

5. UNIX for Dummies Questions & Answers

Script to display lines in a file in a particular format

I have a bunch of files in various folders. I want to go through each of them and display certain lines in a particular format All files have a similar format Date: Time: User: Message: Miscellaneous: (and some other stuff)I want to display to only the "Date:", "Time:" "User:" lines in... (7 Replies)
Discussion started by: newbiegal01
7 Replies

6. Shell Programming and Scripting

Command for changing date format in a file

Hi... I have an inputfile name as :- abc_test_20120213.dat (date in yyyymmdd format) I need the output file name as abc_test_13022012.dat (date in ddmmyyyy format) Please help me on this... Thanks in advance. (5 Replies)
Discussion started by: gani_85
5 Replies

7. Shell Programming and Scripting

Changing date format in CSV file

I have a CSV file with a date format like this; 11/19/2012 17:37:00,1.372,121.6 11/19/2012 17:38:00,0.743,121.6 Want to change the time stamp to seconds after 1970 so I can get the data in rrdtool. For anyone interested, this is data from a TED5000 unit and is Kwatts and volts. Needs to... (3 Replies)
Discussion started by: ottsm
3 Replies

8. Shell Programming and Scripting

Long list file display different time format.

Hi Gurus, I have some weird issue. when using ls -l the result shows different time format: -rw-r--r-- 1 abc gourp1 3032605576 Jun 14 2013 abc -rw-rw-r-- 1 abc gourp1 1689948832 Aug 10 06:22 abc one display 2013 which is year; another one displays 06:22 which is time. ... (4 Replies)
Discussion started by: ken6503
4 Replies

9. Shell Programming and Scripting

Changing format of file with awk

Hi all, I have a file that looks like this: Closest words to: manifesto >>>> Closest words to: passport >>>> and I want to reformat this with awk with the following desired result: manifesto 0.99999999999999978, 'manifesto' 0.72008211381623111, 'communiqu\xe9'... (5 Replies)
Discussion started by: owwow14
5 Replies

10. UNIX for Dummies Questions & Answers

Changing the file name format

Hello all, I am tryign to change the format of files (which are many in numbers). They at present are named like this: SomeProcess_M-130_100_1_3BR.root SomeProcess_M-130_101_2_3BX.root SomeProcess_M-130_103_3_3RY.root SomeProcess_M-130_105_1_3GH.root SomeProcess_M-130_99_1_3LF.root... (7 Replies)
Discussion started by: emily
7 Replies
ppmtoy4m(1)							MJPEG tools manual						       ppmtoy4m(1)

NAME
ppmtoy4m - Convert PPM images to YUV4MPEG2 stream SYNOPSIS
ppmtoy4m [options] [ filename ] DESCRIPTION
ppmtoy4m converts one or more raw PPM images into a YUV4MPEG2 stream ready for further processing by other video tools. Output is to stdout to facilitate piping to other MJPEG tools. The size of the output frame(s) is determined from the (first) input image. Input is a 'raw' format PPM image, read from stdin or from the optional filename. The input may contain multiple PPM images concatenated together; ppmtoy4m will read and process them sequentially. All images must have identical size and format. Input images can be inter- preted as whole progressive frames, interleaved fields, or (in pairs) as sequential fields. The input images must have 8 bits per channel (i.e. 'maxval' must be 255). Input images should be in the usual R'G'B' colorspace. They are converted to the Y'CbCr colorspace (ITU-R BT.601) (and chroma subsampled, if desired) before output. ppmtoy4m and y4mtoppm are inverses of each other; you can pipe the output of one into the other, and vice-versa. Note that the subsampling and colorspace operations are lossy in both directions. And, when converting to PPM, information on interlacing and sample aspect ratio is lost (but can be reconstructed by supplying command-line arguments to ppmtoy4m). OPTIONS
ppmtoy4m accepts the following options: -o num Frame offset: skip output of the first 'num' frames. (default: 0) -n num Output a total of 'num' output frames. Use '0' to specify all frames. (default: 0) -F n:d Set framerate encoded in output stream, as an exact integer ratio. (default: 30000:1001) Common rates are: 24000:1001 - NTSC 3:2 pulldown converted film 24:1 - native film 25:1 - PAL/SECAM 30000:1001 - NTSC video 50:1 - PAL field rate 60000:1001 - NTSC field rate -A n:d Set pixel aspect ratio encoded in output stream, as an exact integer ratio. (default: 1:1) Common ratios are: 1:1 - square pixels (computer graphics) 10:11 - CCIR-601 NTSC 59:54 - CCIR-601 PAL -B Interpret data as being BGR rather than RGB. -I x Set interlacing mode, used to interpret the PPM image(s), and also encoded in output stream. (default: 'p') p - progressive, non-interlaced t - top/upper-field-first interlaced b - bottom/lower-field-first interlaced -L For interlaced streams, treat each PPM image as two interleaved fields. (Otherwise, two PPM images will be read for each frame; one per field.) -r Repeat last input frame until output is complete. If '-n 0' is also specified, last input frame will be repeated forever. -S mode Set chroma subsampling mode. (default: 444) 444 - 4:4:4 (no subsampling) 420jpeg - 4:2:0 JPEG/MPEG-1, interstitial cositing 420mpeg2 - 4:2:0 MPEG-2, horizontal cositing The subsampled modes use a lousy subsampling filter; better results will be achieved by passing the default 4:4:4 output to a scaler which supports subsampling, such as y4mscaler(1). -v [0,1,2] Set verbosity level. 0 = warnings and errors only. 1 = add informative messages, too. 2 = add chatty debugging message, too. EXAMPLES
To convert a file containing a single PPM file into a stream of 15 (identical) frames: ppmtoy4m -n 15 -r some-image.ppm To convert a series of Targa format images (in the current directory) to a YUV4MPEG2 stream displayed by yuvplay: ls *.tga | xargs -n1 tgatoppm | ppmtoy4m | yuvplay AUTHOR
This man page was written by Matt Marjanovic. If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is: mjpeg-users@lists.sourceforge.net For more info, see our website at http://mjpeg.sourceforge.net/ SEE ALSO
ppm(5), y4mtoppm(1), mjpegtools(1), mpeg2enc(1), y4mscaler(1), yuv2lav(1), yuvplay(1) MJPEG Linux Square 28 April 2004 ppmtoy4m(1)
All times are GMT -4. The time now is 04:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy