Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

neaten(1) [osf1 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

Help in modulus operator in Bash

Hi, I would like to know given that i have two columns and I would like to take the positive integer of the differences between the two columns. which means |3-2|=1; |2-3|=1 as well. I would like to know do Bash recognize | | as well for this purposes? Thanks. -Jason (2 Replies)
Discussion started by: ahjiefreak
2 Replies

3. 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

4. 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

5. Shell Programming and Scripting

Count number of occurences of a character in a field defined by the character in another field

Hello, I have a text file with n lines in the following format (9 column fields): Example: contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies

6. 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

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. Shell Programming and Scripting

Formatting output of script

I'm looking for a way to neaten up the out put of an ldapquery. I might get one, none, or several returns for each query; and each query consists of multiple lines. And while each return will contain the same types of info, it might be in a different order, like: uniq: 1 ip: 192.168.2.3... (3 Replies)
Discussion started by: jnojr
3 Replies

10. 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

11. 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

12. Shell Programming and Scripting

Insert space in specific column among many columns

Hello, I have some problem in inserting the space for the pairs of columns. I have the input file : I used this code below in replacing it using space in specific column (replace space in each two columns) sed -e "s/,/ /2" -e "s/,/ /3" inputfile Output showed : However, I have many... (3 Replies)
Discussion started by: awil
3 Replies

13. 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

14. 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

15. 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