cut -c

Hi,
how can I use cut commande to display the content of a file in seperated colomns ? For exemple with a blanc (or 2 or 3 ) between first colomn which is on c1-c4 et second which is from c5 to c7 :

c1c2c3c4 c5c6c7

Many thanks before.

try this:

cut -d" " -fRequire_Col < filename

rishi

Hi,
thank you,
I have this erreor :
cut -d" " -fRequire_Col < myfile
cut: bad list for f option
Regards.

Why don't you post a bit of your file. Things would be much clearer then.

Hi,
here is the content of my file :
DDT00000000540

LMS000000006800000001220069013100307980001080625Asdftts 41251000539
+000000001000000PCE2005/10/13 10:03:07
00000000000389DANPAPETERIE Y40752-0-6398-0 /010004
FIN00000005400000000001

What is it that you want to do with this input ?

Separate the columns based on an whitespace character or get columns 1-4 and 5-7 i.e. for

LMS000000006800000001220069013100307980001080625Asdftts 41251000539
+000000001000000PCE2005/10/13 10:03:07
00000000000389DANPAPETERIE Y40752-0-6398-0 /010004
FIN00000005400000000001

it would be

LMS0 000

Thank you.
what I realy need is to display all columns (all lines) in the file like this :
column1 column2 column3 .......
-------- ------- -------
LMS0 000 0000680000

many thanks.

You could use something like this

cut -c 1-4 < input.file

But it requires so many cuts.

Use the shell builtin approach given in this post - multiple cuts syntax problem

vino