Search Results

Search: Posts Made By: Hornys
Forum: Programming 05-05-2013
1,119
Posted By Hornys
I'm sorry you are right, I made some changes in...
I'm sorry you are right, I made some changes in my script, I actually need to use the output of a "find" for example:
find "$DIRECTORY" -type f
prints:
/dir1/dir2/file1
/dir1/dir2/file2...
Forum: Programming 05-05-2013
1,119
Posted By Hornys
Print only some strings from an output
Hi,

Here is an example:

I have a grep line:
grep -i -r -H "$WORD" "$DIRECTORY"with an output like this:
/media/dir/dir2//dir4/file.txt:/media/dir/dir2/dir3/file_16072008/es6.txt: "content of...
1,590
Posted By Hornys
thanks it work perfectly.
thanks it work perfectly.
1,590
Posted By Hornys
Variable string manipulation
Hi, I have a variable with grep output like this:
WORDS=$(grep -r -c -i -E "palindrom" /"$DIRECTORY"/)
so "echo "$WORDS"" could be:

//directory/file1.txt:0
//directory/file2.txt:0...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy