need solution for scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need solution for scripting
# 8  
Old 01-31-2008
Check this....

Quote:
Originally Posted by kkc
hi

Smilie thanks for the advise~, what is the different withe replace the single codes in the sed command with double codes?Smilie

many thanks
when you want the value of the variables to be substituted, you need to specify the expression in double codes.

==========
Thanks,
Karthikeyan.
==========
# 9  
Old 01-31-2008
MySQL Plz post with care

Quote:
Originally Posted by namishtiwari
You can do something like this--

echo "Enter the file/dir name"
read file

then do the replacements here-
sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g" $file

Thanks
You getting the directory name in the variable file.
and then you are using it as the filename ???
I guess this will create confusion. Pls post with care.

==========
Thanks,
Karthikeyan.
==========
# 10  
Old 01-31-2008
Quote:
Originally Posted by namishtiwari
You can do something like this--

echo "Enter the file/dir name"
read file

then do the replacements here-
sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g" $file

Thanks
SmilieSmilieconfusing.... can more clearly?

Thanks
# 11  
Old 01-31-2008
Quote:
Originally Posted by Karthikeyan_113
when you want the value of the variables to be substituted, you need to specify the expression in double codes.

==========
Thanks,
Karthikeyan.
==========
SmilieSmiliethanks...
# 12  
Old 01-31-2008
tmpfile=/tmp/tmpfile.$$

for file in loaderconfiguration*.xml
do
echo "what is the path:";
read $path;

sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$path|g" $file > $tmpfile
mv $tmpfile $file
done

any changes need to change which is highlighter with red colour...
give some advise and hint please... Smilie

many thanks...SmilieSmilie
# 13  
Old 01-31-2008
Are you getting any error ?

Hi KKC,

are you getting any error ?
anyprobem with the execution, why do you want to changethe highlighted part ?

==========
Thanks,
Karthikeyan.
==========
# 14  
Old 01-31-2008
Quote:
Originally Posted by Karthikeyan_113
Hi KKC,

summer_cherry was asking you to replace the single codes in the sed command with double codes.

Code:
sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g" $file

==========
Thanks,
Karthikeyan.
==========
FYI:

"single codes" is correctly spelled "single quotes". Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

2. Shell Programming and Scripting

need the solution

Write a program to print all prime numbers from 1 to 300. (3 Replies)
Discussion started by: paniruddha
3 Replies

3. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies
Login or Register to Ask a Question