10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need to write a script to find all "*.sh" files in /home file system and if any string find "*.sh" files with the name email@example.com need to replace with firstname.lastname@example.org. I just understood about the find the command to search .sh files. Please help me on this.
find / -name... (3 Replies)
Discussion started by: bhas85
2. Shell Programming and Scripting
I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere.
grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml... (2 Replies)
Discussion started by: mahesh Madpathi
3. Shell Programming and Scripting
Hello there! I'm having a lot of trouble writing a script.
The script is supposed to:
1) Find all files with the name "Object.mtl" within each folder in the directory: /Users/username/Desktop/convert/Objects
2) Search and replace the string ".bmp" with ".tif" (without the quotations)
3)... (1 Reply)
Discussion started by: Blue Solo
4. UNIX for Dummies Questions & Answers
Hi, I'm new to Unix. My understanding of Unix and its command is very limited.
I have about 1000 text files that have a word in it that I need to replace with a different word.
a.txt has 1 line of txt: monday, tuesday, wednesday
b.txt has 1 line of txt: monday, tuesday,... (5 Replies)
Discussion started by: millsy5
5. Shell Programming and Scripting
I have five config files in /etc that I want to edit in one click for testing.
I would like to make a script like this :
calling_sed_or_awk_or_whatelse $a_file search_for_all $src_str replace_with... (4 Replies)
Discussion started by: jcdole
6. Shell Programming and Scripting
I'm trying to remove the following string from several files.
<img heigth="1" width="1" border="0" src="http://myteenmovies.net/t.php?id=5540372">I'm using the following script
# This script will search and replace all regular files for a string
# supplied by the user and... (1 Reply)
Discussion started by: d13g0sv
7. Shell Programming and Scripting
I've been trying to write a script which finds a string and change it with another string. For this i want to search all files (with its arguments) under a spesific directory and its subdirectories.
For example lets assume i want to replace an IP= 192.168.0.4 with another... (4 Replies)
Discussion started by: EAGL€
8. Shell Programming and Scripting
i need to change string in all files in current folder and all subfolders. i wrote the following script. It works good except it dont delete temp file from subfolders.
for z in `find . -type f -name "*.html" -o -name "*.htm"`; do
sed -e 's@abc@xyz@g' $z>temp;
mv temp $z;
any idea?... (1 Reply)
Discussion started by: crazynups
9. Shell Programming and Scripting
I have a directory has DIR1 and the D1 directory has 200+ files.
I want change the string from "Bangalore" to "Bangaluru" in all files in the D1 directory.
Thanks (2 Replies)
Discussion started by: koti_rama
10. UNIX for Dummies Questions & Answers
I used the following script
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
Discussion started by: pharos467