Daniel.Roberts on 22 Dec 2010 10:41:56 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Script Help?


Sorry
I miss spoke...
I do see in fact a tab had been inserted!
Dan 

-----Original Message-----
From: plug-bounces@lists.phillylinux.org
[mailto:plug-bounces@lists.phillylinux.org] On Behalf Of
Daniel.Roberts@sanofi-aventis.com
Sent: Wednesday, December 22, 2010 1:38 PM
To: plug@lists.phillylinux.org
Subject: Re: [PLUG] Script Help?


 with the sed command
sed 's/\([^\]*\)$/\1\t\1/'

I do get the full filename copied..but how do I insert a tab between the
filenames??

I need This
K:\DAN\Integrated Genomics\Manoji Roberts\Platform Technology\Affymetrix
Expression\27APR2007\Rabbit430_2\4-27-2007_DGMR-CT55_Part3.DTT
4-27-2007_DGMR-CT55_Part3.DTT

And not this
K:\DAN\Integrated Genomics\Manoji Roberts\Platform Technology\Affymetrix
Expression\27APR2007\Rabbit430_2\4-27-2007_DGMR-CT55_Part3.DTT4-27-2007_
DGMR-CT55_Part3.DTT

Which I am getting
Dan

-----Original Message-----
From: plug-bounces@lists.phillylinux.org
[mailto:plug-bounces@lists.phillylinux.org] On Behalf Of Walt Mankowski
Sent: Wednesday, December 22, 2010 1:01 PM
To: plug@lists.phillylinux.org
Subject: Re: [PLUG] Script Help?

On Wed, Dec 22, 2010 at 12:39:44PM -0500,
Daniel.Roberts@sanofi-aventis.com wrote:
> Hello All
> 
> What might be a Linux command line way of reading a large file of 
> about 40,000 lines of like below
> A          K:\DAN\Integrated Genomics\Manoji Roberts\Platform
> Technology\Affymetrix
> Expression\27APR2007\Rabbit430_2\4-27-2007_DGMR-CT55_Part3.DTT
> 
> And preparing a file that looks like
> 
> A          K:\DAN\Integrated Genomics\Manoji Roberts\Platform
> Technology\Affymetrix
> Expression\27APR2007\Rabbit430_2\4-27-2007_DGMR-CT55_Part3.DTT
> 4-27-2007_DGMR-CT55_Part3.DTT
> 
> 
> That is the filename is always after the last "\" of any given line 
> and I would like that complete filename copied into a new 
> column...seperated by a tab..

These seem to work:

sed:

sed 's/\([^\]*\)$/\1\t\1/'

perl:

perl -pe 's/([^\\]*)\n/$1\t$1\n/'
________________________________________________________________________
___
Philadelphia Linux Users Group         --
http://www.phillylinux.org
Announcements -
http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --
http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug