Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

neaten(1) [osx man page]

NEATEN(1)						      General Commands Manual							 NEATEN(1)

NAME
neaten - neaten up output columns SYNOPSIS
neaten [ format ] DESCRIPTION
Neaten reads from its standard input and neatens up columns separated by white space using the specified format. The format is a string consisting of a positive integer followed by an alignment character and another integer. The alignment character is usually a decimal point ('.'), but it can be any non-digit. The alignment character is used as the central point of each column. The total column field width will be the number to the left of the alignment character plus one for the alignment character itself plus the number to the right of the alignment character. If a field does not contain the alignment character, it will be printed to the left of where the alignment character would have appeared. If a field is too long to print within the specified format, the entire field will be printed and that row will not be aligned with the rest. The default format is "8.8". EXAMPLE
To examine a file with columns of numbers: neaten 10.8 < input | more BUGS
Columns wider than the total width of the format specification will be printed without any separating white space. The program does not do anything special with tabs on the input. AUTHOR
Greg Ward SEE ALSO
cnt(1), rcalc(1), rlam(1), total(1) RADIANCE
11/15/93 NEATEN(1)

Check Out this Related Man Page

NEATEN(1)						      General Commands Manual							 NEATEN(1)

NAME
neaten - neaten up output columns SYNOPSIS
neaten [ format ] DESCRIPTION
Neaten reads from its standard input and neatens up columns separated by white space using the specified format. The format is a string consisting of a positive integer followed by an alignment character and another integer. The alignment character is usually a decimal point ('.'), but it can be any non-digit. The alignment character is used as the central point of each column. The total column field width will be the number to the left of the alignment character plus one for the alignment character itself plus the number to the right of the alignment character. If a field does not contain the alignment character, it will be printed to the left of where the alignment character would have appeared. If a field is too long to print within the specified format, the entire field will be printed and that row will not be aligned with the rest. The default format is "8.8". EXAMPLE
To examine a file with columns of numbers: neaten 10.8 < input | more BUGS
Columns wider than the total width of the format specification will be printed without any separating white space. The program does not do anything special with tabs on the input. AUTHOR
Greg Ward SEE ALSO
cnt(1), rcalc(1), rlam(1), total(1) RADIANCE
11/15/93 NEATEN(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing parts of a specific field

All, I have a field in a comma seperated file with hundreds of lines and about 20 columns and I wish to remove all numbers after the decimal point in field 4 on each line and output the rest to another file or write it back to itself. File is like this 20070126, 123.0, GBP, 1234.5678,... (9 Replies)
Discussion started by: kieranh
9 Replies

2. UNIX for Dummies Questions & Answers

Tools for alignment of code?

Hello, Do we have any freeware which helps in alignment of code wrt spaces, sections etc? Thanks (6 Replies)
Discussion started by: eagercyber
6 Replies

3. Shell Programming and Scripting

Cleanup Weird character in Unix

Hi, I have a pipe delimited file and I am running into an issue where a field is having some weird character and I am not able to clean it up. It is 2nd field and the weird character is M- . See below. cat -v test.dat 02169| M- PATRICKM- MCALEER |Y 01318| M- LARRYM- PETERSON |Y 30319|... (5 Replies)
Discussion started by: msalam65
5 Replies

4. UNIX for Dummies Questions & Answers

replace "," with "." only in specific columns of a file?

Hi all, I have this text file containing 9 columns separated by space. The 8th columns contains the numbers. C1 C2 C3 C4 C5 C6 C7 C8 C9 er rt yt gh iu nk il 0.07 xs yt lr ty bg iu zk nh 0,0005 lt ...etc. I want to replace the comma with full stop only in 8th coloumn. the output... (8 Replies)
Discussion started by: Unilearn
8 Replies

5. Shell Programming and Scripting

Printing entire field, if at least one row is matching by AWK

Dear all, I have been trying to print an entire field, if the first line of the field is matching. For example, my input looks something like this. aaa ddd zzz 123 987 126 24 0.650 985 354 9864 0.32 0.333 4324 000 I am looking for a pattern,... (5 Replies)
Discussion started by: Chulamakuri
5 Replies

6. UNIX for Dummies Questions & Answers

Find certain number of character in vi

Hello, Experts, I have a file with the first and second column connected together, and i want to use vi to seperate them (put a space in between). Is there any command in vi would put a space after the 7th letter? Thanks! example: 0.981101.517 2.944101.517 4.907101.517 (10 Replies)
Discussion started by: wingsy1212
10 Replies

7. Shell Programming and Scripting

Extract portion of data

Hi Gurus, I need some help in extracting some of these information and massage it into the desired output as shown below. I need to extract the last row with the header in below sample which is usually the most recent date, for example: 2012-06-01 142356 mb 519 -219406 mb 1 ... (9 Replies)
Discussion started by: superHonda123
9 Replies

8. Shell Programming and Scripting

need to remove invariant characters

Hello, I have a nexus alignment file that looks like this: bar101_min2covg_binarynex 11001-100111 bar102_min2covg_binarynex 110010010011 bar103_min2covg_binarynex 11101010--11 etc. There are 41 rows and 28014 characters in each, with 0, 1, and missing data (-) as the three... (7 Replies)
Discussion started by: ljk
7 Replies

9. UNIX for Dummies Questions & Answers

awk code to reconstruct sequence from alignment

Hi Everyone, I need some help to construct a long 'Sbjct' string from the following input using incremental order of 'Sbjct' starting number (e.g. 26325115,33716368,33769033,34869860 etc.) Different 'Sbject' string will be separated by 'NNNN's as: ... (6 Replies)
Discussion started by: Fahmida
6 Replies

10. Shell Programming and Scripting

Issue with sed and regular expressions

I have a file, each line has the date and time twice, once at the start of the line, and again half way along. to neaten things up, and to make it easier to read i'm removing one set. Wasn't as easy as identify the text and remove, as it'd remove both. So i added some text at the beginning of... (4 Replies)
Discussion started by: chr15b
4 Replies

11. Shell Programming and Scripting

[Solved] Replace character in 3rd column and leave 1rst and last

Hello to all, I have the following text where columns are separated by spaces. I want to have the 3rd column separating 3 strings with 2 "_" in the format below: LeftSring_CentralString_RightString So, in 3rd column I want to replace all "_" with "-", except the first and last "_" The... (5 Replies)
Discussion started by: Ophiuchus
5 Replies

12. Shell Programming and Scripting

awk command to find total number of Special character in a column

How to find total number of special character in a column? I am using awk -f "," '$col_number "*$" {print $col_number}' file.csv|wc -l but its not giving correct output. It's giving output as 1 even though i give no special character? Please use code tags next time for your code and... (4 Replies)
Discussion started by: AjitKumar
4 Replies

13. Shell Programming and Scripting

Linux - Pivot Rows to Columns

Morning All, I am wanting to try and Pivot a set of data which is currently in a row format, to a column format. This will potentially need to run over a large dataset, therefore I am thinking awk may be the most efficient solution? I would like to Pivot the data around Col1 & Col2 which are... (9 Replies)
Discussion started by: RichZR
9 Replies

14. Shell Programming and Scripting

Remove of white space when you have multiple column

i have file in which i want to remove white space from each column where ever it exist there is white space at the end of line. i know how to remove white space if i have only 1 column, but i have multiple columns and white space can be in any column. sed 's/ *$//' file ath-miRf10005-akr... (5 Replies)
Discussion started by: mirwasim
5 Replies

15. Shell Programming and Scripting

How to repeat a character in a field if it's a single character?

I have a csv dataset like this : C,rs18768 G,rs13785 GA,rs1065 G,rs1801279 T,rs9274407 A,rs730012 I'm thinking of use like awk, sed to covert the dataset to this format: (if it's two character, then keep the same) CC,rs18768 GG,rs13785 GA,rs1065 GG,rs1801279 TT,rs9274407... (7 Replies)
Discussion started by: nengcheng
7 Replies