I am wanting to automate a process that includes the step of appending to a filename a string of text that's contained inside the file. I.e. if filename A.fileA contains a string of text that reads 1234 after the phrase ABC, I want the shell script file to rename the file 1234_FileChecked_A.fileA.... (3 Replies)
Hi guys,
I am currently facing a problem with my current script, the script basically monitor a list of process on the Unix system. If a process is down it will send a notification e-mail to me.
Currently I am facing an error when running the script grep: RE error 41: No remembered search... (2 Replies)
Hello,
I have over 200 files and some of them have the string like "John price $200". I would like to grep the string. Then output the filename which found the string.
I have the following script, but it ONLY output the string
echo Please input list file name:
read listn
for file in `cat... (3 Replies)
Hi,
I want to grep one file for a search string and get the next 10 lines after the search string.
for eg,in file tnsnames.ora,i have 100 entries.i want to search for one string and get the entry for that db.
please help how to acheive this using awk or sed?
Thanks. (11 Replies)
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Hi All,
I'm using aix flavour unix where im trying for the below kind of pattern to search in all the files in a directory.
I tried with different possible combinations like
grep -ir "out.*\transaction_ctry_code" * etc....
Pattern I'm trying for :
out<any thing>country_cd
Here i... (0 Replies)
I call my bash shell script "test.sh" and pass "admin_usr.txt" as an argument like below.
./test.sh admin_usr.txt
Inside the "test.sh" i wish to check if the filename passed "admin_usr.txt" i.e "$1" contains the string "admin" or not ... which in this case it does.
Note: I do not wish to... (5 Replies)
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)