Thanks, but that is the documented (and standards-required) behavior.
Here's the description of the --tabs option from `info unexpand':

`-TAB1[,TAB2]...'
`-t TAB1[,TAB2]...'
`--tabs=TAB1[,TAB2]...'
     If only one tab stop is given, set the tabs TAB1 spaces apart
     instead of the default 8.  Otherwise, set the tabs at columns
     TAB1, TAB2, ... (numbered from 0), and leave spaces and tabs
     beyond the tabstops given unchanged.  If the tabstops are specified
     with the `-t' or `--tabs' option, they can be separated by blanks
     as well as by commas.  This option implies the `-a' option.

I don't see a convenient way to get the behavior you want, so I'll add
an option to counteract the effect of the `implied -a' semantics.

"Jie Xu" <[EMAIL PROTECTED]> writes:
| Thanks for the response.  Here is my example.
|
| $ echo "    a   b   c  "|unexpand -t 4|cat -A
| ^Ia^Ib^Ic  $
|
| "-t" seems to turn on "-a".  What I want is
|
| > echo "    a   b   c  "|unexpand -t 4|cat -A
| ^Ia   b   c  $
|
| Jie
|
|
| ----- Original Message -----
| From: Jim Meyering <[EMAIL PROTECTED]>
| To: Jie Xu <[EMAIL PROTECTED]>
| Cc: <[EMAIL PROTECTED]>
| Subject: Re: unexpand bug: all spaces are converted without -a
|
| > "Jie Xu" <[EMAIL PROTECTED]> writes:
| > | I use GNU textutils 2.0 on linux. expand converts all spaces to tabs
| when -a
| > | is not specified. I read the document. It says
| >
| > It works fine for me:
| >
| >   $ echo "        a       b       c" |unexpand |cat -A
| >   ^Ia       b       c$
| >   $ echo "        a       b       c" |unexpand -a |cat -A
| >   ^Ia^Ib^Ic$
| >
| > Please give an example showing how it fails.

Reply via email to