LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 08-23-2003, 07:50 PM   #1
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 31
vim 'n' lynx: command line option to search for string


Hi All!

I've looked at man and info pages, but can't figure out how to pass an argument to lynx and vim on the command line that will highlight all occurences of a given string. I'm thinking something like

vim --search-string=highlightme $foo.txt
lynx --search-string=highlightme $foo.html

Can this be done? Any alternatives?

Thanks,

Samsara
 
Old 08-23-2003, 08:24 PM   #2
martinman
Member
 
Registered: Apr 2003
Distribution: Gentoo 1.4
Posts: 290

Rep: Reputation: 30
in vim you can search by typing "/ searchterm"
 
Old 08-23-2003, 08:38 PM   #3
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by martinman
in vim you can search by typing "/ searchterm"
Yeah, sorry I should have mentioned that. I want to do it from the command line, because I have a lot of files to go through and a fetish for automating things

Cheers,

Samsara
 
Old 08-23-2003, 09:31 PM   #4
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
have you tried grep?
 
Old 08-24-2003, 11:52 AM   #5
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by seabass55
have you tried grep?
Oh, I use grep lots, but it's not the same: for instance, in grep you can't tell whether something is a tab or a space, if you see what I mean... grep is really good for predictable situations, e.g. where you know exactly how many context lines you will need, but you won't always have that prior information.

Thanks anyway,

Samsara
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
escape string in bash script so it can be used in command line BuckRogers01 Linux - Software 15 08-12-2010 09:38 AM
Command line option -F means what? TSynergy Linux - Newbie 5 11-15-2005 08:01 PM
Downloading files with lynx directly via command line Dade Linux - Software 5 06-11-2005 01:43 PM
vim search and replace - split line phreak7t7 Programming 2 08-16-2004 05:02 PM
Command line to search where's the apllication installed mikeccs Linux - Newbie 7 07-23-2004 07:42 AM


All times are GMT -5. The time now is 01:46 PM.

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