Search Results

Search: Posts Made By: n8575
2,632
Posted By n8575
Deleting text from a file
Hi,
In my korn shell script, I want to delete some particular text from a certain file...How can this be done? Is the below right?

ed $NAMES << EOF
echo "" > /dev/null
echo "${x} = " ...
8,825
Posted By n8575
Thanks a lot!
Thanks a lot!
8,825
Posted By n8575
Change a parameter to be in capital letters
Hi,
I have a korn shell script with 1 parameter.
My script deletes certain files, for example....

sid=$1

rm $ORC/dbs/orapwd${sid} #orapwddb1

rm $ORC/dbs/lk${sid} #lkDB1

In the...
23,754
Posted By n8575
Thank you!
Thank you!
23,754
Posted By n8575
create a text file in a script
Hi,
i want to create a text file (init${x}.ora) and write information to it via a korn shell script.
Is it right to do it as shown below (the file doesnt exist yet)?

x=$1...
6,458
Posted By n8575
this is the output i get....looks like the...
this is the output i get....looks like the i_backup file doesnt exist??

./createdb.sh[139]: /u01/app/oracle/admin/db2/pfile/: cannot create
./createdb.sh[140]: /u01/app/oracle/admin/db2/pfile/:...
6,458
Posted By n8575
for i `ls -1 $ORACLE_BASE/admin/${dest}/pfile/` ...
for i `ls -1 $ORACLE_BASE/admin/${dest}/pfile/`
do
echo src=${src}
echo dest=${dest}
echo "replacing ${src} to ${dest} for $i"
echo "s#${src}#${dest}#g"
sed -e "s#${src}#${dest}#g"...
6,458
Posted By n8575
I get this error with the mv command.... ...
I get this error with the mv command....

./createdb.sh[139]: /u01/app/oracle/admin/db2/pfile/: cannot create
mv: cannot rename /u01/app/oracle/admin/db2/pfile/ to...
6,458
Posted By n8575
I have done exactly what u showed below, and when...
I have done exactly what u showed below, and when the script is running i see that that does work. Only thing is that it doesnt get saved, so when i open the file after the script has finished, it's...
6,458
Posted By n8575
Yes, that was a typo....i did use ls -1, not ls...
Yes, that was a typo....i did use ls -1, not ls -l (it's become natural to type it coz i use it so often!) and got the errors mentioned earlier.

Anyway, i tried it again. Here is my code...

for...
6,458
Posted By n8575
Yes, for sure.
Yes, for sure.
6,458
Posted By n8575
Also didnt work :( I even tried to do just the...
Also didnt work :(
I even tried to do just the sed command, without the cp or mv commands coz those were giving errors, but the sed still didnt do it's job :S
6,458
Posted By n8575
It still didnt work :( I get a whole lot of the...
It still didnt work :( I get a whole lot of the same type of error as shown below...

replacing db1 to db2 for total
./createdb.sh[135]: /u01/app/oracle/admin//pfile/: cannot create
mv: cannot...
6,458
Posted By n8575
I still get the same cp error, and another error...
I still get the same cp error, and another error which i have no idea what it is referring to...

cp: cannot access init.ora.162006131752
First RE may not be null

The sed command still didnt...
6,458
Posted By n8575
cp & sed error
Hi,
Below is a small piece of my Korn shell script - what i am trying to do is substitute all occurrences of the word given by the ${src} parameter with the word given by the ${dest} parameter in...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy