10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have below lists of files
filename-1.0.0.tar.gz
filename-1.0.1.345657676.snapshots.tar.gz
so when I do grep -o 'filename-*.tar.gz' | sort | tail -1
then it consider snapshots as a part of it's result.
How can I make sure, that it should only display the results from... (3 Replies)
Discussion started by: manas_ranjan
3 Replies
2. Shell Programming and Scripting
cat /tmp/i.txt
'(ORA-28001|ORA-00100|ORA-28001|ORA-20026|ORA-20025|ORA-02291|ORA-01458|ORA-01017|ORA-1017|ORA-28000|ORA-06512|ORA-06512|Domestic Phone|ENCRYPTION)'
grep -ia 'ORA-\{5\}:' Rep* |grep -iavE `cat /tmp/i.txt`
grep: Unmatched ( or \(
Please tell me why am i getting that (6 Replies)
Discussion started by: jhonnyrip
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
If I have a list called list.txt and on each line theres a string of the form something*blah, how do I remove everything after the * for each item? Thanks! (7 Replies)
Discussion started by: jyu429
7 Replies
4. Shell Programming and Scripting
I have a script to create a variable from a list, B.txt and then search it in another file, file.txt and then print the pattern line and next line.
#!/bin/bash
while read a
do
echo "$a" | grep -A 1 $a file.txt > $a\.txt
done < B.txt
I always get that no such file or directory exists... (6 Replies)
Discussion started by: godzilla07
6 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
it possible creating a file with list of directories, and using grep to find pattern on only directories and subdirectories contained in that file?
And it is done?
regards (4 Replies)
Discussion started by: bspirit
4 Replies
6. Shell Programming and Scripting
Hi,
I want to grep a string from the list of files present in a text file.
I want the output to be printed only when the string is present in a file along with the file name..
I tried some thing like
cat files_list | grep "search_string" $_
I know $_ is wrong but i want something... (7 Replies)
Discussion started by: nigas
7 Replies
7. UNIX for Dummies Questions & Answers
I have multiple systems with each having its own log directory containing log file pertinent to that system. I have constructed a find/grep statement to get the list of directories ending in log, but I can't seem to pipe that to grep (via xargs) to have grep search each file in the log directories... (8 Replies)
Discussion started by: jmgibby
8 Replies
8. Shell Programming and Scripting
hi all,
for an example:
In a file out.txt contains:
/export/home/raghu/bin/debug_serverLog_apache_20090626_0625.txt
How to grep or cut the value as "debug_serverLog_apache_20090626_0625.txt"
or i want only the output as "debug_serverLog_apache_20090626_0625.txt"
pls advice me (3 Replies)
Discussion started by: raghur77
3 Replies
9. Shell Programming and Scripting
Hi everybody! :) :D :D :)
it's great to be here since this is my first post.
touch /base/oracle/FRA/XMUT00/RMAN_FLAG
touch /base/oracle/FRA/XRLL00/RMAN_FLAG
find directory name containing RMAN_FLAG :
$ find /base/oracle/FRA -name RMAN_FLAG -print|xargs -n1 dirname |sort -u... (3 Replies)
Discussion started by: jolan_louve
3 Replies
10. UNIX for Dummies Questions & Answers
Hi
I need to search for matching strings in a database and I want to print out all files that matches in "detail", which means that I want the output to contain datum of last saving. I only get the grep function tp print the actual file names which is not enough since the database is to large... (14 Replies)
Discussion started by: slire
14 Replies