Re: Trouble with sed and semicolon delimiter...
Tom Lynch <[email protected]> Wed, 19 Jan 2022 08:26:00 -0800 (PST)
| 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.