On 12Feb2017 20:06, bruce wrote:
Got a quick sed question now..
test file::
head -2 sed.dat
228d98f0_f16a_11e6_9544_1ad613f05f7b,1486934882
22b93712_f16a_11e6_a6ad_1ad613f05f7b,1486934883
I always say "sed 2q" instead of "head -2", myself.
want to simply truncate/searc
On Sun, Feb 12, 2017 at 08:06:28PM -0500, bruce wrote:
> Hey guys.
>
> Thanks for the delete replies..
>
> Got a quick sed question now..
>
> test file::
> head -2 sed.dat
> 228d98f0_f16a_11e6_9544_1ad613f05f7b,1486934882
> 22b93712_f16a_11e6_a6ad_1ad613f05f7b,
On 02/12/2017 08:06 PM, bruce wrote:
> Hey guys.
>
> Thanks for the delete replies..
>
> Got a quick sed question now..
>
> test file::
> head -2 sed.dat
> 228d98f0_f16a_11e6_9544_1ad613f05f7b,1486934882
> 22b93712_f16a_11e6_a6ad_1ad613f05f7b,1486934883
>
I'm a awk user.
cat sed.dat | awk -F"," '{print $1}'
or
awk -F"," '{print $1}' sed.dat
On Sun, Feb 12, 2017 at 5:06 PM, bruce wrote:
> Hey guys.
>
> Thanks for the delete replies..
>
> Got a quick sed question now..
>
> tes
On Sun, Feb 12, 2017 at 08:06:28PM -0500, bruce wrote:
> Hey guys.
>
> Thanks for the delete replies..
>
> Got a quick sed question now..
>
> test file::
> head -2 sed.dat
> 228d98f0_f16a_11e6_9544_1ad613f05f7b,1486934882
> 22b93712_f16a_11e6_a6ad_1ad613f05f7b,
On 02/12/2017 05:06 PM, bruce wrote:
the following isn't working
sed -i 's/\,+$//' sed.da
That would remove one or more commas, if they immediately precede the
end of the line.
You mean:
sed 's/,.*$//'
or:
cut -f1 -d,
___
users mailing list
Hey guys.
Thanks for the delete replies..
Got a quick sed question now..
test file::
head -2 sed.dat
228d98f0_f16a_11e6_9544_1ad613f05f7b,1486934882
22b93712_f16a_11e6_a6ad_1ad613f05f7b,1486934883
want to simply truncate/search/replace the end of each line starting
with the ",&qu
Date: Thu, 21 Jul 2016 08:00:44 -0400
From: bruce
Subject: sed question
Hey guys..
Sed question.. should be simple, but after stack/net searches, lots or
trials.. can't seem to get it..
I've got a case
any thoughts on how to handle the parens would be cool!
just irks me that
On Thu, Jul 21, 2016 at 08:00:44AM -0400, bruce wrote:
> Hey guys..
>
> Sed question.. should be simple, but after stack/net searches, lots or
> trials.. can't seem to get it..
>
> I've got a case
>
> foo('txt')
> foo("txt")
>
thanks.. guys..
just a brain screwup.. should be ok now.. thanks for the eyeballs..
owe you guys oj!
On Thu, Jul 21, 2016 at 11:01 AM, Tethys wrote:
> On Thu, Jul 21, 2016 at 1:00 PM, bruce wrote:
>
> > Now. I do a simple sed search/replace if it just focuses on the txt, but
> > crafting a
On Thu, Jul 21, 2016 at 1:00 PM, bruce wrote:
> Now. I do a simple sed search/replace if it just focuses on the txt, but
> crafting a sed that uses the entire input as a search due to the parens '()'
> is a bit painful! Doing the sed using the \( for the ( wasn't quite
> successful!
localhost:~
On 7/21/2016 8:26 AM, bruce wrote:
Hey Tudor, and others..
The test sed I posted works for doing a search/replace of the text
inside the parens...
> foo('txt')
> foo("txt")
however.. if i wanted to craft a sed that uses the entire
>>foo('txt')<< as the search.. then I run into the need to h
hey todor..
I'll give it a try.. I was thinking it's the parens.. overlooked the fact
that i introduced '/' in the replace.. which might have caused issue.. but
the '/' was successful in the test with just the text inside the ()..
On Thu, Jul 21, 2016 at 8:59 AM, Todor Petkov
wrote:
> On Th
On Thu, Jul 21, 2016 at 3:26 PM, bruce wrote:
> Hey Tudor, and others..
>
> The test sed I posted works for doing a search/replace of the text inside
> the parens...
>
>> foo('txt')
>> foo("txt")
>
> however.. if i wanted to craft a sed that uses the entire >>foo('txt')<< as
> the search.. then I
need to handle the parens.. and that's the
issue..
this doesn't work
sed -i 's/foo('txt')/foo('/dir1/txt') /' *files.dat
sed -i 's/foo\('txt'\)/foo\('/dir1/txt'\)/' *files.dat
thanks
On Thu, Jul 21, 2016 at 8:14 AM,
On Thu, Jul 21, 2016 at 3:00 PM, bruce wrote:
> Hey guys..
>
> Sed question.. should be simple, but after stack/net searches, lots or
> trials.. can't seem to get it..
>
> I've got a case
>
> foo('txt')
> foo("txt")
>
> I'd
Hey guys..
Sed question.. should be simple, but after stack/net searches, lots or
trials.. can't seem to get it..
I've got a case
foo('txt')
foo("txt")
I'd like to have
foo('/dir1/txt')
foo("/dir1/txt")
Now. I do a simple sed search/re
On 06Jun2015 21:53, bruce wrote:
Evening..
Morning...
As a test, the following is an attempt to replace "text" from a test
file with "text" from an external file.
aa=$(cat www1.txt)
BTW, this can be written:
aa=$(< www1.txt)
sed -i "s*#\tISSUES/NOTES::*$aa*g" foo.py1
When I check the
Evening..
As a test, the following is an attempt to replace "text" from a test
file with "text" from an external file.
aa=$(cat www1.txt)
sed -i "s*#\tISSUES/NOTES::*$aa*g" foo.py1
When I check the foo.py1 file, I get "$aa" in the file, instead of the
replacement text.
The test is using replace
19 matches
Mail list logo