I want to have a function with a similar interface:
that will search recursively all directories for *.cpp file, containing line 'asdf' inside. I tried this:
But it doesn't work all the time. For example, if i run it in dir1:
it only greps file1.cpp without going down to file2.cpp. I figured out it happens because of globbing *.cpp to the list of files in dir1, but i have no idea, how to avoid it in function without turning globbing off. Quotes do not help either. Any ideas?
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)
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)
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)
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)
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)
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)
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)