I have a program that is designed to take the first parameter (a file extension) and use it to rewrite the file stored in the second paramerter with the new extension. And if the current file does not exist then the program will print an error message "No such file."
For example, my program is chExt.sh and if the first parameter is the extension 'txt' and my second paramter is the current file name 'marcopolo.grp' then the program would rewrite the file to 'marcopolo.txt'
When executing the program like this ./chExt.sh 'txt' 'marcopolo.grp'
the program successfully rewrites the file to 'marcopolo.txt'
When executing the program like this ./chExt.sh 'cpp' 'batman.FIG'
the program successfully rewrites the file to 'batman.cpp'
The problem I am having is if the second parameter is a file name with the special character "$" in the extension...
For example, ./chExt.sh 'bar' 'fo$o.b$r' does not successfully rewrite the file name to what it should be (fo$o.bar).
Dear Friends,
Please help me on this
my script name is send.csh
In this i have written the statement like this
set args = ( city state country price )
I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell
or
how to pass to... (2 Replies)
Hi All,
I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them
abc.sh
----------
export Numbr_Parms=$#
export a=1
while
do
export... (3 Replies)
Hi Guys,
I need to run an alias from a k-shell script ,for example 10204, which points to :
source $ORACLE_BASE/scripts/cshrc/10204/.cshrc
Meaning , I need to run in my k-shell script with the env settings parameters of the alias.
How to do it in k-shell?
Thanks in advance,
Nir (2 Replies)
hi , I wanted to create a script, and I have no idea how to, and I would appreciate any help on that. Any advice on solving this is welcome. Thanks
Here it goes:
make a shell script in bash that show the activity of users. The results should be a summary or a complete report in a file.... (2 Replies)
I use csh a lot but I don't really write csh scripts. Now I have a need to implement a security check (written in perl; verify an user input security code) into a csh script. Here is the senario:
#csh
1. call the perl script
2. if the perl script returns 'true', pass on;
if the perl... (1 Reply)
Hi,
I basically have 2 shell scripts.
One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system.
Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn.
... (2 Replies)
hi, I have a csh script, which has
setenv X xyz etc
My shell is korn
Is there some way I can "source" this to have the variables in my current korn shell?
thanks (3 Replies)
Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files..
Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this?
Please tell me... (2 Replies)