10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have used the command
cat * | grep -r <<String>> *
It returns:
cat : JAN : is directory
***********************
*********************
My directory structure:
log
- JAN
-catalina.out
-FEB
-catalina.out
-MARCH
... (11 Replies)
Discussion started by: nanthagopal
11 Replies
2. Shell Programming and Scripting
I have a pattern like:
column "5" is missing
PS: the no is in double quotes.
The number usally changes, so we use a loop to grep.
grep 'column "$number" is missing' filename.txt
But it is not working....
How to solve this? (2 Replies)
Discussion started by: karumudi7
2 Replies
3. Shell Programming and Scripting
I want to search a text in file but that file is pointing to variable.
ex:
file=there was nothing special
grep "there was nothing" $file
but its not working . Can u let me know that how we can use variable($file) in grep command.
Please use code tags (6 Replies)
Discussion started by: allthanksquery
6 Replies
4. Shell Programming and Scripting
how can I use grep with a variable to find a value?
cat data.out
Hello World
grep "Hello World" data.out
Hello World ## Value found
I want to do something like this but can't seem to get it to work any
suggestions would be appreciated.
var="Hello World"
grep $var data.out (3 Replies)
Discussion started by: BeefStu
3 Replies
5. Solaris
Hi,
how to grep recursively in a directory on Solaris OS.
grep -r throws an error that -r is an invalid option.
Please tell me if you have any solution.
Regards,
Jeevan.
ps.
I searched this forum for solution, but could not find anything useful. (4 Replies)
Discussion started by: jredx
4 Replies
6. Shell Programming and Scripting
I am not sure if i am doing this correctly since it returns quickly. i need to grep for a keyword in all files in a directory
grep keyword /mydirectory
is that correct? I just want to know which files have a keyword in it.
i am using korn shell in solaris 5.1. There does not appear to... (12 Replies)
Discussion started by: guessingo
12 Replies
7. Shell Programming and Scripting
I have the code below, which works fine when I have directories like dir1 and ../dir but does not work with ~/dir. Can anyone help?
echo enter a directory
read dir
echo $dir
if
then
echo it is a dir
else
echo not dir
fi (3 Replies)
Discussion started by: desperatelySeek
3 Replies
8. Shell Programming and Scripting
Hi all,
I am trying to do a simple thing in my mind. However I am fairly new to bash. What I need to do is create a folder for each partition on each CD, and each partition has a unique name (with spaces in it, do not ask why, it is already done :confused: ) . All CD's will show up... (2 Replies)
Discussion started by: sgstuart
2 Replies
9. Shell Programming and Scripting
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
Discussion started by: alrinno
2 Replies
10. Shell Programming and Scripting
Hi,
I'd like to grep a variable that I saved in the program.
Like
grep '0\$variable1' file1
Does someone know what's wrong with this command?
Thanks a lot! (2 Replies)
Discussion started by: whatisthis
2 Replies