LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 06:31 AM   #1
Jykke
Member
 
Registered: Sep 2005
Posts: 201

Rep: Reputation: 19
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, 08:25 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 09:08 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

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



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 10:48 AM
[SOLVED] Extract Multiple Strings per Line ckinninger Linux - Newbie 7 03-20-2011 12:38 AM
extract part of a line with sed or awk alirezan1 Linux - Newbie 2 10-01-2008 09:44 PM
sed to extract multiple matches in a line? mhoch3 Linux - Software 8 08-01-2005 03:32 PM
How to extract a part of a line by sed? J_Szucs Programming 2 02-15-2003 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:48 AM.

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
Open Source Consulting | Domain Registration