Sponsored Content
Full Discussion: find words with grep....
Top Forums Shell Programming and Scripting find words with grep.... Post 302070712 by chrisxgr on Thursday 6th of April 2006 06:24:58 PM
Old 04-06-2006
find words with grep....

I have a .txt file which contains several lines of text. I need to write a script program using grep or any other unix tool so as to detect part of the text (words) between / / that begin with the symbol ~.
For example if somewhere in the text appears a webpage address like
http://www.cs.may.ie/~dtray/cs211/lecture1.htm,
my program must print only the word dtray (the symbol ~ must be ommited)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep with find to search for matchiing words

Hi all, Please help me in the following dbt i want to know the different files in the current and the sub directory which have some search key in that . for example i want to know all filenames followed by the word 'unix' in all files. the file name and the matching word have... (1 Reply)
Discussion started by: akhil313
1 Replies

2. UNIX for Dummies Questions & Answers

Grep Three Words

I have been trying to find files containing the words AAA, BBB and CCC. I tried: grep AAA `grep BBB files*` grep CCC files* but is does not work I tried several ways this is an easy one but I am a dummy, Does anyone can help me? Thanks :( (12 Replies)
Discussion started by: murbina
12 Replies

3. UNIX for Dummies Questions & Answers

search multiple words using grep

Hi frnds i want to desplay file names that should be word1 and word2 ex : i have 10 *.log files 5 files having word1 and word2 5 files having only word1, i have used below command egrep -l 'word1|word2' *.log its giving all 10 files, but i want to display only 5... (20 Replies)
Discussion started by: pb18798
20 Replies

4. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

5. Shell Programming and Scripting

grep for words in file

Hi Please can you help me on this: How to grep for multiple words in a file, BUT for every word found output it to a new line. regards FR (8 Replies)
Discussion started by: fretagi
8 Replies

6. Shell Programming and Scripting

grep words from txt

Queue on node in domain description : type : local max message len : 104857600 max queue depth : 5000 queue depth max event : enabled persistent msgs : yes backout threshold : 0 msg delivery seq :... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

7. Shell Programming and Scripting

Confused with grep for multiple words

Hi guys and gals, I have many files that contains many lines of data. I am trying to find a needle in a haystack in that I'm looking only for files that contain word1 AND word2. I'm using ... ... but this is finding files that contains word1 OR word2. No good for me. How can I grep to... (7 Replies)
Discussion started by: bbbngowc
7 Replies

8. UNIX for Dummies Questions & Answers

Grep words with X doubles only

Hi! I'm trying to figure out how to find words with X number of doubles, only. I'm searching a dictionary, (one word per line). For instance, if you want to find words containing only one pair of double letters, you could do something like this: egrep '(.)\1' wordlist.txt |egrep -v '(.)\1.*(.)\2'... (3 Replies)
Discussion started by: sudon't
3 Replies

9. Shell Programming and Scripting

How to grep the words with space between?

see I have a text like: 27-MAY 14:00 4 aaa 5.30 0.01 27-MAY 14:00 3 aaa 0.85 0.00 27-MAY 14:00 2 aaa 1.09 0.00 27-MAY 14:00 5 aaa 0.03 0.00 27-MAY 14:00... (3 Replies)
Discussion started by: netbanker
3 Replies

10. Shell Programming and Scripting

Grep only words containing specific string

Hello, I have two files. All urls are space seperated. source http://xx.yy.zz http://df.ss.sd.xz http://09.09.090.01 http://11.22.33 http://canada.xx.yy http://01.02.03.04 http://33.44.55 http://98.87.76.65 http://russia.xx.zz http://aa.tt.xx.zz http://1w.2e.3r.4t http://china.rr.tt ... (4 Replies)
Discussion started by: baris35
4 Replies
xscreensaver-text(1)						XScreenSaver manual					      xscreensaver-text(1)

NAME
xscreensaver-text - prints some text to stdout, for use by screen savers. SYNOPSIS
xscreensaver-text [--verbose] [--columns N] [--text STRING] [--file PATH] [--program CMD] [--url URL] DESCRIPTION
The xscreensaver-text script prints out some text for use by various screensavers, according to the options set in the ~/.xscreensaver file. This may dump the contents of a file, run a program, or load a URL. OPTIONS
xscreensaver-text accepts the following options: --columns N or --cols N Where to wrap lines; default 72 columns. --verbose or -v Print diagnostics to stderr. Multiple -v switches increase the amount of output. Command line options may be used to override the settings in the ~/.xscreensaver file: --string STRING Print the given string. It may contain % escape sequences as per strftime(2). --file PATH Print the contents of the given file. If --cols is specified, re-wrap the lines; otherwise, print them as-is. --program CMD Run the given program and print its output. If --cols is specified, re-wrap the output. --url HTTP-URL Download and print the contents of the HTTP document. If it contains HTML, RSS, or Atom, it will be converted to plain-text. Note: this re-downloads the document every time it is run! It might be considered abusive for you to point this at a web server that you do not control! ENVIRONMENT
HTTP_PROXY or http_proxy to get the default HTTP proxy host and port. BUGS
The RSS and Atom output is always ISO-8859-1, regardless of locale. URLs should be cached, use "If-Modified-Since", and obey "Expires". SEE ALSO
xscreensaver-demo(1), xscreensaver(1), fortune(1), phosphor(1), apple2(1), starwars(1), fontglide(1), dadadodo(1), webcollage(1), http://www.livejournal.com/stats/latest-rss.bml, http://twitter.com/statuses/public_timeline.atom, driftnet(1), EtherPEG, EtherPeek COPYRIGHT
Copyright (C) 2005 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Jamie Zawinski <jwz@jwz.org>, 20-Mar-2005. X Version 11 5.15 (28-Sep-2011) xscreensaver-text(1)
All times are GMT -4. The time now is 02:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy