LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 12-05-2012, 07:31 AM   #1
Jykke
Member
 
Registered: Sep 2005
Posts: 168

Rep: Reputation: 16
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.
 
Old 12-05-2012, 09:25 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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......)
 
Old 12-05-2012, 10:08 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Insert line using sed or awk at line using line number as variable sunilsagar Programming 11 02-03-2012 11:48 AM
[SOLVED] Extract Multiple Strings per Line ckinninger Linux - Newbie 7 03-20-2011 01:38 AM
extract part of a line with sed or awk alirezan1 Linux - Newbie 2 10-01-2008 10:44 PM
sed to extract multiple matches in a line? mhoch3 Linux - Software 8 08-01-2005 04:32 PM
How to extract a part of a line by sed? J_Szucs Programming 2 02-15-2003 07:49 PM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration