LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   sed one line extract between two strings on one line - several occurences (https://www.linuxquestions.org/questions/linux-desktop-74/sed-one-line-extract-between-two-strings-on-one-line-several-occurences-4175440123/)

Jykke 12-05-2012 06:31 AM

sed one line extract between two strings on one line - several occurences
 
I got a problem with firefox - somehow it shot
my bookmarks and now I have some backup file.
The information in it is all on one line and
I thought of extracting all http stuff with a sed
command but I could not get it right.

the sed -n 's/start/,/end/p' did not work
I would have some startstring like "uri" and endstring like
","charset" but somehow I don't get it with backslashes and
stuff. The command just prints about everything.

pixellany 12-05-2012 08:25 AM

Quote:

the sed -n 's/start/,/end/p' did not work
That construct is an "address range", and works on a line basis---i.e. it would print all lines beginning with the first on containing "start", and ending with the first one containing "stop".

Can you post an excerpt from the file?

Does FF have a utility for recovering bookmarks from backup? (There's a voice talking to me......)

pixellany 12-05-2012 09:08 AM

In the bookmarks menu, click on "Show all bookmarks"--this opens the "Library" window, where there is a control to restore...
http://support.mozilla.org/en-US/kb/...g-from-backups


All times are GMT -5. The time now is 10:25 AM.