Thanks Assaf, 

Sorry for the confusion - I wanted to add a tab (or even a new line) after each 
file that was concatenated. Actually a new line may be better. 

For Example:
Concatenate the files like so:
>gi|452742846|ref|NZ_CAFD010000001.1| Salmonella enterica subsp., whole genome 
>shotgun sequenceTTTCAGCATATATATAGGCCATCATACATAGCCATATAT
>gi|452742846|ref|NZ_CAFD010000002.1| Salmonella enterica subsp., whole genome 
>shotgun 
>sequenceCATAGCCATATATACTAGCTGACTGACGTCGCAGCTGGTCAGACTGACGTACGTCGACTGACGTC
>gi|452742846|ref|NZ_CAFD010000003.1| Salmonella enterica subsp., whole genome 
>shotgun sequenceTATATAGATACATATATCGCGATATCAGACTGCATAGCGTCAG

Right now - Just using cat, they look , like:
>gi|452742846|ref|NZ_CAFD010000001.1| Salmonella enterica subsp., whole genome 
>shotgun 
>sequenceTTTCAGCATATATATAGGCCATCATACATAGCCATATAT>gi|452742846|ref|NZ_CAFD010000002.1|
> Salmonella enterica subsp., whole genome shotgun 
>sequenceCATAGCCATATATACTAGCTGACTGACGTCGCAGCTGGTCAGACTGACGTACGTCGACTGACGTC>gi|452742846|ref|NZ_CAFD010000003.1|
> Salmonella enterica subsp., whole genome shotgun 
>sequenceTATATAGATACATATATCGCGATATCAGACTGCATAGCGTCAG


Kim



-----Original Message-----
From: Assaf Gordon [mailto:assafgor...@gmail.com] 
Sent: November 23, 2015 2:03 PM
To: Macdonald, Kim - BCCDC; 22...@debbugs.gnu.org
Subject: Re: bug#22001: Is it possible to tab separate concatenated files?

tag 22001 notabug
close 22001
stop

Hello Kim,

On 11/23/2015 03:50 PM, Macdonald, Kim - BCCDC wrote:
> I'm just looking at the options for the cat command - I see there's a 
> way to ignore tabs when they exist - but is there a way to tab 
> separate the files you're concatenating with the cat command?

It is unclear (to me) what you're trying to achieve - could provide a bit more 
details (perhaps a short example) ?

If you have a file (one file) with spaces and you wish to convert them to tabs, 
consider the 'expand' command (then pipe to 'cat' if needed).

If you have multiple files and you wish to print them side-by-side, separated 
by tabs (as opposed to one-after-the-other, as with 'cat'), consider using 
'paste':

   $ cat 1.txt
   a
   b
   c
   d

   $ cat 2.txt
   1
   2
   3
   4

   $ cat 3.txt
   w
   x
   y
   z

   $ paste 1.txt 2.txt 3.txt
   a    1       w
   b    2       x
   c    3       y
   d    4       z

regards,
  - assaf




Reply via email to