Sponsored Content
Top Forums Shell Programming and Scripting cut operation is not helping me much Post 302484216 by methyl on Thursday 30th of December 2010 06:58:41 AM
Old 12-30-2010
The "awk" in post #2 should work because it doesn't care whether white space is tabs or spaces or multiples of either character.


I believe that there must be more than one consecutive tab character in some of your white space.

Please post the output from this "sed" command which is designed to make control characters visible (such as tab characters):
Code:
sed -n l filename

 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a helping hand --stuck in starting of this problm.

Hi all it is a real challenge for me to do it in 2 days any help or suggestion will be a great ! Problem : I have 17 - CSV files (Coma separated value) each file conating around 26 column the first line of each of the file conatin the field name and from second line the file contain data for... (13 Replies)
Discussion started by: jambesh
13 Replies

2. IP Networking

helping new Linux users remotely ?

I volunteer with a small charity which locally donates refurbished computers to people who normally could not afford their own computer. Most of these computers now have Linux on them. We are in the process of remastering Xubuntu 9.04 to use as our main distro from now on. In the past any time... (3 Replies)
Discussion started by: lagagnon
3 Replies

3. Shell Programming and Scripting

Helping in parsing subset of text from a big results file

Hi All, I need some help to effectively parse out a subset of results from a big results file. Below is an example of the text file. Each block that I need to parse starts with "reading sequence file 10.codon" (next block starts with another number) and ends with **p-Value(s)**. I have given... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

4. Shell Programming and Scripting

Column operation : cosne and sine operation

I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file . file.txt 900.00000 1 1 1 500.00000 500.00000 100000.000 4 4 1.45257346E-07 899.10834 ... (4 Replies)
Discussion started by: shashi792
4 Replies

5. Shell Programming and Scripting

Helping with similar "read -t" for KSH file

Hi all, I've trying to apply this command into my .ksh file, but UNIX doesn't accept this option. I need wait a few seconds (maybe 20sec. is very well). Could you please help me? code: #!/bin/ksh .... .... .... read -t 20 continue_run if ]; then; continue_run='N' fi ...... (3 Replies)
Discussion started by: speed_racer
3 Replies

6. Shell Programming and Scripting

Helping a Newbie with Shell Homework

Good Evening, i got a homework where i have to list all files in the directory with the name length >=3 and <= 6 and after trying it for 2 days my Prof gave me a bit of code: #!/bin/bash for file in $(ls) do done after that he told me "now you only have to use wc and you got it" but... (1 Reply)
Discussion started by: Mentoss
1 Replies
col(1)							      General Commands Manual							    col(1)

Name
       col - filter reverse line feeds

Syntax
       col [-options]

Description
       The command reads the standard input and writes the standard output.  It performs the line overlays implied by reverse line feeds (ESC-7 in
       ASCII) and by forward and reverse half line feeds (ESC-9 and ESC-8, respectively).  The command is particularly useful for filtering multi-
       column output made with the command of and for filtering output resulting from the preprocessor.

       Although  accepts half line motions in its input, it does not normally output them.  Instead, text that would appear between lines is moved
       to the next lower full line boundary.

       The control characters SO (ASCII code 017) and SI (ASCII code 016) are assumed to start and end text in an alternate  character	set.   The
       character  set (primary or alternate) associated with each printing character read is remembered.  On output, SO and SI characters are gen-
       erated where necessary to maintain the correct treatment of each character.

       The command normally converts white space to tabs to shorten printing time.  If the -h option is given, this conversion is suppressed.

       On input, the only control characters accepted are <space>, <backspace>, <tab>, <return>, <newline>, etc...  The VT character is an  alter-
       nate  form  of  full reverse linefeed, included for compatibility with earlier programs of this type. All other non-printing characters are
       ignored.

Options
       -b     Assumes that the output device does not have backspacing.

       -f     Suppresses moving half lines to the next full line.

       -h     Suppresses conversion of white space to tabs.

       -p     Forces through unchanged any unknown escape sequences that are found in its input. This option should be used with care.

       -x     Suppresses conversion of white space to tabs (same as -h).

Restrictions
       Cannot back up more than 128 lines.
       No more than 800 characters, including backspaces, on a line.

See Also
       tbl(1), nroff(1)

																	    col(1)
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy