Hi Valery,

My LANG was set to en_US.utf8. I changed it to C as you suggested and that
worked! Thanks much for that tip.

Best regards,

Chetan

On Tue, Jun 14, 2011 at 3:35 PM, Valery Mitsyn <[email protected]> wrote:

> On Tue, 14 Jun 2011, Chetan Tiwari wrote:
>
>  Greetings,
>>
>> I was having trouble using the cut command and wasn't sure if anyone else
>> on
>> this list faced a similar problem. Perhaps I am doing something wrong and
>> any help will be much appreciated.
>>
>> I am using SL6 and the version of cut installed is "cut (GNU coreutils)
>> 8.4". I have a text file with the following line:
>>
>> abcdefghijklmnopqrstuvwxyz
>>
>> When I execute the following statement: "cut -c1-3,24- test.txt", I get
>> the
>> correct output: abcxyz. When I run the same command, but with a
>> --output-delimiter flag (i.e. cut -c1-3,24- test.txt
>> --output-delimiter="|"), I get the exact same output as before: abcxyz.
>> The
>> delimiter (I - pipe symbol) is missing.
>>
>
>  What is LANG/LC_ALL enveronment in your shell?
> If it is something with .UTF-8 try to set it without suffix.
> LANG=C cut --output-delimiter="|" -c 1-3,24- test.txt
> should do the trick.
>
>
>
>> When I run the exact same commands on a machine running Ubuntu with "cut
>> (GNU coreutils) 7.4", I get the desired output: abc|xyz. The same problem
>> occurs with larger data files that I was trying to manipulate as well.
>>
>> Thanks,
>>
>> Chetan
>>
>>
> --
> Best regards,
>  Valery Mitsyn
>

Reply via email to