Sponsored Content
Top Forums Shell Programming and Scripting rearranging the data in file (from columnwise to rowwise) Post 302104578 by reborg on Thursday 25th of January 2007 09:19:58 PM
Old 01-25-2007
Code:
tr -s '[:blank:]' '\n' < file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to print data row/columnwise

PRDCNT=12 FILS= f1=1 f2=2 f3=3 f4=4 f5=5 CNT=0 CNT=`expr $PRDCNT - 5` MNT=6 VR=1 while do f$VR="$f$VR,$MNT" echo "$f$VR" MNT=`expr $MNT + 1` CNT=`expr $CNT - 1` VR=`expr $VR + 1` if then (8 Replies)
Discussion started by: swaminathanks
8 Replies

2. Shell Programming and Scripting

Insert records in a file columnwise

Hello everyone!!!!! Need some help on inserting data in a file columnwise. Example: File1: 1|AAA|25|2 5|qqe|20|7 4|wer|31|81 I need to create a second file in which data can be inserted in a columnwise manner i.e. File2: AAA|25|1|2 qqe|20|5|7 wer|31|4|81 The order of columns in... (1 Reply)
Discussion started by: abhijeet1409
1 Replies

3. UNIX for Advanced & Expert Users

Insert records in a file columnwise

Hello everyone!!!!! Need some help on inserting data in a file columnwise. Example: File1: 1|AAA|25|2 5|qqe|20|7 4|wer|31|81 I need to create a second file in which data can be inserted in a columnwise manner i.e. File2: AAA|25|1|2 qqe|20|5|7 wer|31|4|81 The order of columns in... (1 Reply)
Discussion started by: abhijeet1409
1 Replies

4. Shell Programming and Scripting

Doubt with rearranging file through awk

Filename1.xml NO 2012-11-16 02:00:27 20121115/pathname/ asia Filename1.rec YES 2012-11-16 01:20:24 20121115/pathname asia FIleName2.xml YES 2012-11-16 01:20:25 20121115/pathaname asia if the file content are... (6 Replies)
Discussion started by: manas_ranjan
6 Replies

5. Shell Programming and Scripting

Trim a file columnwise

Hi All, I want to trim each columns leading & trailing (like sql trim function) of a ',' separated file.. I've a file like this.. manab , c gi lucky , home babu , maa I want the output as manab,c gi lucky,home babu,maa A one liner would be a great help. (2 Replies)
Discussion started by: manab86
2 Replies

6. Shell Programming and Scripting

File comparison in UNIX columnwise

Hi all, I want to compare two files with same number of rows and columns with records in same order. Just want to highlight the differences in the column values if any. file A 1,kolkata,19,ab 2,delhi,89,cd 3,bangalore,56,ef file2: 1,kolkata,21,ab 2,mumbai,89,gh 3,bangalore,11,kl... (9 Replies)
Discussion started by: prabhat.diwaker
9 Replies

7. UNIX for Dummies Questions & Answers

Reading Xml file and print the values into the text file in columnwise?

hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file <sequence> <Filename>aldorzum.doc</Filename> <DivisionCode>US</DivisionCode> <ContentType>Template</ContentType> <ProductCode>VIMZIM</ProductCode> </sequence>... (4 Replies)
Discussion started by: sravanreddy
4 Replies

8. Shell Programming and Scripting

Data rearranging from rows to column

Hello Everyone, I have a input file looks like -0.005-0.004-0.003-0.002-0.00100.0010.0020.0030.0040.005My desired output should look like -0.005 -0.004 -0.003 -0.002 -0.001 0 0.001 0.002 0.003 0.004 0.005I had some success in getting the desired output. But i face a problem when i... (15 Replies)
Discussion started by: dinesh.n
15 Replies

9. Shell Programming and Scripting

Help with rearranging file with script

Hi Guys I normally do thins with a Windows program but I am trying to rearrange a filename based on delimiters in Ubuntu. Example v017 __ Detective Academy Q #133 Murder in the Village Of Suspension Bridges &&& Part 9.cbz = Detective Academy Q v017 #133 Murder in the Village Of Suspension... (9 Replies)
Discussion started by: itschrisonline
9 Replies

10. Shell Programming and Scripting

Rearranging Data Set

Hello everybody, I've got the following problem: The data set I have is an ASCII file containing a header over 4 lines and the actual data comprised of dezimal numbers in a 1000x1000 grid (1000 lines and 1000 columns). Since I want to plot the data in GMT I need to convert it into the... (3 Replies)
Discussion started by: Evilknievel
3 Replies
EXIFCOM(1)						      General Commands Manual							EXIFCOM(1)

NAME
exifcom - display or set the UserComment tag contained in a JPEG Exif section SYNOPSIS
exifcom [ -bfinv ] [ -w comment ] [ -s delim ] file ... DESCRIPTION
When invoked without arguments, the exifcom utility displays the contents of the Exif UserComment tag contained in file to the standard output. Otherwise, depending on the options specified, exifcom will blank the tag or set it to comment. Some digital cameras include a standard UserComment tag in the Exif data added to the image files they produce. This comment tag is fixed- length and supports multi-byte character sets (though exifcom does not). Note that not all cameras will include the tag. The utility is conservative in its approach to writing the UserComment tag. It does not modify, extend, or otherwise adulterate an image's Exif metadata structure. When writing the tag it merely changes pre-allocated bytes. Therefore, exifcom is at the mercy of the Exif data creator for both the presence of the tag and its length. It cannot create a UserComment tag when the camera does not include one, nor can it write a comment longer than the space pre-allocated by the camera. exifcom only displays and writes ASCII character set comments. OPTIONS
-b Blank the UserComment tag, overwriting both the character code and comment fields with NUL. The character code specifies how the comment is represented; it is "undefined" when blank. This is the state to which many cameras initialize the tag. When used in conjunction with the -w option, exifcom will blank the comment prior to setting it to comment. -f Overwrite or blank existing or unsupported comments without prompting for confirmation. -i Write a prompt to standard error before overwriting or blanking an existing or unsupported comment. If the response from the stan- dard input begins with 'y' or 'Y', the comment is overwritten. This option is default behavior. -n Do not overwrite or blank existing or unsupported comments and do not prompt for confirmation (i.e., automatically answer 'no' to a confirmation prompt). This option takes precedence over both the -f and -i options. -s Separate field name and value in the verbose and multiple file cases with the string delim. The default is ': '. -v Be verbose when printing the contents of the UserComment tag. Besides the comment itself (if present and supported), exifcom will display the maximum comment length supported, the character code of the comment, and the length of the comment. -w Set UserComment to the ASCII string comment. If comment is longer than what the tag supports, it will be truncated to fit. DIAGNOSTICS
The exifcom utility exits 0 on success. When displaying a comment from a single file, if the UserComment tag is missing, it exits 1; if blank, it exits 2; if in an unsupported character code, it exits 3. Otherwise, it exits 1 if an error occurs. SEE ALSO
exiftags(1), exiftime(1) STANDARDS
The exifcom utility was developed using the January 2002 Exif standard, version 2.2 (http://tsc.jeita.or.jp/). BUGS
If the tag doesn't exist or is too short, too bad. AUTHOR
The exifcom utility and this man page were written by Eric M. Johnston <emj@postal.net>. EXIFCOM(1)
All times are GMT -4. The time now is 01:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy