10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am working on a script to search for text.
read -p "Enter text to search for : " n1
grep $n1 /home/andy/bin/*.sh
It works, but if I backspace, it does this.
Enter text to search for : sset Master^
------ Post updated at 12:39 PM ------
My mistake is I used the left arrow key... (4 Replies)
Discussion started by: drew77
2. Shell Programming and Scripting
I would like to search exactly "string1.string2.string3" and replace it by "new_string1.new_string2.new_string3"
I would like to search exactly "string2.string3" and replace it by "new_string2.new_string3"
I would not found in the result : "string1.new_string2.new_string3"... (3 Replies)
Discussion started by: jcdole
3. Shell Programming and Scripting
What is the best way (bash/awk/sed?) to read in two text files and do a keyword search/replace?
I love Los Angeles.
Coming to Dallas was the right choice.
San Francisco is fun.
Go to Seattle in the summer.
... (3 Replies)
Discussion started by: pxalpine
4. Shell Programming and Scripting
I am very new to Linux and am trying to find a way for following problem.
I have a number of files in a folder as Export000.dat, Export001.dat ..and so on.
Each file has a string field 'Absolute velocity'. I want it to be replaced by 'Pixel shift' in all the files. I tried something like... (4 Replies)
Discussion started by: chirag.joshi
5. UNIX for Dummies Questions & Answers
I need to search for a particular string. This string might be present in many files. The directory in which I am present has more than one subdirectories. Hence, the search should check in all the subdirectories and all the corresponding files and give a list of files which have the particular... (5 Replies)
Discussion started by: pakspan
6. Shell Programming and Scripting
I am trying to write a shell script to search for a pattern in the directory and show only one entry for each field, essentially I am looking to search for a pattern in a file and list that file name. (1 Reply)
Discussion started by: grajp002
7. Shell Programming and Scripting
I need UNIX command that would give me all files without the string "4R" anywhere in the file. I have about a hundred files in my directory, and I need to list all files wihtout the string "4R" anywhere. Can anyone help me please? Thank you.l (4 Replies)
Discussion started by: risk_sly
8. Shell Programming and Scripting
I was google searching and found
Perl as a command line utility tool
This almost solves my problem:
find . | xargs perl -p -i.old -e 's/oldstring/newstring/g'
I think this would create a new file for every file in my directory tree. Most of my files will not contain oldstring and I... (1 Reply)
Discussion started by: siegfried
9. UNIX for Dummies Questions & Answers
I have many scripts in directories and sub-directories that I would like to search for a specific string. How would I do that? (1 Reply)
Discussion started by: bggibson
I'm looking for a easy way to do a recursive search through a directory structure for all files that begin with '.' that are group or other writable.
Any suggestions? (5 Replies)
Discussion started by: maficdan