10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
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 vijay@gmail.com need to replace with vijay.bhaskar@gmail.com. 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
3 Replies
2. UNIX for Beginners Questions & Answers
Dear all,
I want to find all the "," in my text file and then replace the commas to a tab. I found a script online but I don't know how to modify the script for my case. Any one can help? Thank you.
@echo off &setlocal
set "search=%1"
set "replace=%2"
set "textfile=Input.txt"
set... (2 Replies)
Discussion started by: forevertl
2 Replies
3. Programming
I have 2 text files:
cities.txt
San Francisco
Los Angeles
Seattle
Dallas
master.txt
Atlanta is chill and laid-back.
I love Los Angeles.
Coming to Dallas was the right choice.
New York is so busy!
San Francisco is fun.
Moving to Boston soon!
Go to Seattle in the summer.
... (0 Replies)
Discussion started by: pxalpine
0 Replies
4. Shell Programming and Scripting
I need to update about 2400 files in a directory subtree, with a new directory path inside the files
I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2
with this: /u01/PROD/apps/apps_st/10.1.3
I know how to change single words using "find . -type f -print0 |... (6 Replies)
Discussion started by: wicus
6 Replies
5. Shell Programming and Scripting
Here's the nonfunctional code I have so far
#!/bin/bash
searchFor=(`cat filea.txt` )
replaceWith=(`cat fileb.txt`)
myMax=${#searchFor}
myCounter=1
while ;
do sed -i 's/${$searchFor}/${$replaceWith}/g'
done
The goal is to use each line in filea.txt as a search term, and each line... (2 Replies)
Discussion started by: Erulisseuiin
2 Replies
6. Shell Programming and Scripting
Hi.
I would like to have experts help on below action.
I have text files in which page nubmers exists in form like
PAGE : 1
PAGE : 2
PAGE : 3 and so on there is other text too. I would like to know is it possible to check the last occurance of Page... (6 Replies)
Discussion started by: lodhi1978
6 Replies
7. Shell Programming and Scripting
Hi ,
I have a directory structure as dir and subdirectories and files under it and so on.now I need to find the files which contain the search string under every dir and subdir and replace .
my search string is like
searchstring=/a/b
string to be replaced=/a/c/b
please help.
... (7 Replies)
Discussion started by: mohanpadamata
7 Replies
8. Shell Programming and Scripting
Hi all,
I am new to unix and wanted to replace the string consisting \ with nothing.
I tried the following but did not help.
for y in `ls DIV*`;
do
sed s/C:\\Project\\AML\\bin//g $y > temp
mv temp $y
done
I actually want to remove any occurance of C:\Project\ABC\bin in... (4 Replies)
Discussion started by: cv_pan
4 Replies
9. Shell Programming and Scripting
Hi,
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
2 Replies
10. UNIX for Dummies Questions & Answers
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
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
2 Replies