Re: Trouble with sed and semicolon delimiter...

Tom Lynch <[email protected]>
Newsgroups alt.comp.lang.shell.unix.bourne-bash
Message-ID <[email protected]>
On Wednesday, January 19, 2022 at 9:29:08 AM UTC-5, Michael F. Stemper wrote:

> > SRC_URI = "git://bb/foo.git;protocol=ssh;tag=v1.1.0;lfs=0;subpath=pctrlmc/c2cmtd"
> Are you sure that's what you have? When I execute that line, I get 
> 
> $ SRC_URI =
> "git://bb/foo.git;protocol=ssh;tag=v1.1.0;lfs=0;subpath=pctrlmc/c2cmtd"
> SRC_URI: command not found 

Yes, I should be more specific, this is the BitBake line I'm trying to parse to get the version from,
it's just an example. 
> 
> Can you just use sed? 
> 
> $ 
> SRC_URI="git://bb/foo.git;protocol=ssh;tag=v1.1.0;lfs=0;subpath=pctrlmc/c2cmtd" 
> $ echo $SRC_URI | sed 's/.*;tag=//' | sed 's/;.*//' 
> v1.1.0 

That is a possibility,  hadn't thought of breaking it into two sed commands...

Thanks
> $ 
> 
> 
> -- 
> Michael F. Stemper 
> Nostalgia just ain't what it used to be.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.