hi guys,
Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do
it ???
jatin (13 Replies)
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)
... (11 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
(o) Checkout an auto part: should prompt the user for the name of the auto part
and borrower's name:
Name:... (2 Replies)
I have a directory /java/unix/data
In data directory i have so many files from which i want to find some files who look alike below.(there are number of such below such files as well different files too in the data directory)
-68395#svg.xml
-56789#ghi.xml
-67894#gjk.org
-56734#gil.txt
I... (6 Replies)
Hi Folks,
Below is an extract from a VME Print file which gets handed over to a print house. The problem I have is not that tricky rther looking for a way to handle it in a simple and clean way.
Is to first select all lines with "0058" which have four spaces so "0058 " as the selcetion... (3 Replies)
Hi all
This is my first post. Please bear with me with all my mistakes. I started learning shell since couple of days now and this might be quite basic for all, i want to search for files in a directory containing specific string and replace it with new string. The code i wrote is quite bulky... (2 Replies)
Hi,
Need your advices,
Input :
select code,status,input from VIEW1.VIEWNAME where IDU_CD IN ('S','N') and status_col='derived')) union select code,status,input from VIEW1.VIEWNAME2
where date='#p1'
Expected output :
select code,status,input from VIEW1.VIEWNAME where... (2 Replies)
I am trying to write shell script to find and replace using Sed. but i am unable to complete the setting. need help in doing that.
Requirement:
FROM
"${O_INSTANCE}/diag/logs/${C_TYPE}/${C_NAME}/httpd.pid"
TO
"/var/opt/<SID>_<HOSTNAME>/Apache/httpd.pid" (10 Replies)
Hi,
I need to replace the space " " with underscore "_" using shell scripting. The data are inside the text file. Is there are any simple code to that.? (3 Replies)