Sponsored Content
Full Discussion: bash search function
Top Forums Shell Programming and Scripting bash search function Post 302241952 by Ikon on Tuesday 30th of September 2008 04:33:37 PM
Old 09-30-2008
Search Current Directory
Code:
egrep asdf *.cpp

Search all directories under current including current:
Code:
egrep -R asdf *.cpp

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find function name based on word search

Hi All, I want to find out function name based on word. Here i ll give u one example I have several files based on below format. file will start and ends with same name only EX: file1.txt public function calculate1() { ---- ---- call Global Function1() ---- ---- } END... (9 Replies)
Discussion started by: spc432
9 Replies

2. Shell Programming and Scripting

BASH function error

Hey everyone. I am currently testing my first function based BASH script. The ultimate goal is going to be moving logs from point A to point B (or if B is down, to point C). Part of this involves the following function: function testAlive{ ping -c 1 -q $1 } Now when I run ping -c... (1 Reply)
Discussion started by: msarro
1 Replies

3. UNIX for Dummies Questions & Answers

If function to search for files

Hi, I need to concatenate two files as long as both files are present. As of now, I am using the following code: #!/bin/bash for y in {1..14} do cat -s $y.F $y.R > $y.1 done However, the outputfile is being generated even in the absent of both infiles. I would like to search for both... (2 Replies)
Discussion started by: Xterra
2 Replies

4. Shell Programming and Scripting

Bash function

startvm() { startguest } Is there a way use one line to get this ? actually I want startvm=startguest (5 Replies)
Discussion started by: yanglei_fage
5 Replies

5. Programming

Search function help

Hello again unix.com, I need a help with a search function on the website i'm building. http://auto-nonstop.ro/index.php?page=search --> when I press Apply the search fields of the plugin pops up... all i want to do is http://auto-nonstop.ro/index.php?page=search to be the page before I press... (1 Reply)
Discussion started by: galford
1 Replies

6. UNIX for Dummies Questions & Answers

Bash INKEY$ function...

This is probably common knowledge to the professionals but not so much for amateurs like myself. This is a code snippet for the equivalent of BASIC's... LET char$=INKEY$ As the timeout parameter cannot be less than 1 second then this is the only limitation... It is a single line... (5 Replies)
Discussion started by: wisecracker
5 Replies

7. Shell Programming and Scripting

Bash function problem

I am trying to figure out why I am having a "problem" with some functions in a bash script I am running. The reason for air quoting is that the functions are working, they are just not displaying anything to screen when called from another function. Here's an example: function Create_Input {... (6 Replies)
Discussion started by: dagamier
6 Replies

8. Shell Programming and Scripting

Bash to search file for string and lauch function if found

In the bash below I am searching the filevirus-scan.log for the Infected files: 0 line (in bold) and each line for OK. If both of these are true then the function execute is automatically called and processing starts. If both these conditions are not meet then the line in the file is sent to the... (2 Replies)
Discussion started by: cmccabe
2 Replies
NNGRAB(1)						      General Commands Manual							 NNGRAB(1)

NAME
nngrab - news retrieval by keyword (nn) SYNOPSIS
nngrab [ -c ] keyword DESCRIPTION
nngrab invokes nn on all USENET articles whose subject (or keyword) field(s) contain an instance of keyword. nngrab is a fast equivalent for: nn -mxX -s/keyword all For example, nngrab tesla will retrieve items concerning Nikola Tesla. Keyword case is ignored unless -c is specified, and the keyword can be a regular expressions (escaped to avoid conflicts with the shell). For example, nngrab "n.*tesla" The range of search includes all newsgroups on the system, including ones which are unsubscribed. FILES
$db/subjects subject database SEE ALSO
nn(1), nnspew(8), egrep(1) NOTES
nngrab can be much faster than the equivalent command shown above, if the tertiary news subject database generated by the nnspew(8) daemon exists. To enable the faster operation, nnspew must be executed regularly by cron. nngrab uses egrep(1) to scan the subject database, so if you are not running fast egrep (GNU-style) this is all for naught. nngrab will use a subject database generated by nnspew independent of its age. Thus, if you stop running nnspew, remember to remove the subjects file as well. BUGS
Under version 6.4 onwards, search of the "Keywords:" field is not supported. Search on name is not possible either. AUTHOR
James A. Woods, NASA Ames Research Center E-mail: jaw@ames.arc.nasa.gov 4th Berkeley Distribution Release 6.6 NNGRAB(1)
All times are GMT -4. The time now is 02:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy