03-08-2010
Thank you very much anchal khare and abubacker for your prompt response.
Really appreciate.
To make it clear.. This is my original objective:
Quote:
job_name="$(echo "load_didrnge.sh")"
table_name="$(echo "DIDRNGE")"
cv="$(echo "CV000")"
cv="$(print 'CV09')"
file_name=`CP99978_`$cv`.TXT`
file_name="$(awk '{print $1}' $cv )"
log=/tmw/oradata14/monthly_log/CP99978_$cv.log
sqlldr crispadm/admcrisp data=/tmw/oradata14/CP99978_CV001.TXT control=/home/oracle9/dba_area/adslmpr.ctl log=/tmw/oradata14/monthly_log/CP99978_CV001.TXT.log \
bad=/tmw/oradata14/monthly_log/CP99978_CV001.TXT.bad errors=5000000 skip=1
set cv="$(echo "CV001")"
/home/oracle9/dba_area/general/PROCEDURE_TRACKING_LOG.sql "$job_name" "$file_name" "$table_name" "$log"
In other words, I'm gonna repeat that sqlldr command for another 3 CVs..
Since, the filename only distinctive by that CV.. That's why I don't want to issue that filename command again and again.
Thank you.
---------- Post updated at 03:37 PM ---------- Previous update was at 03:33 PM ----------
So, is that the only way to achive this i.e. by creating function?
I don't know it could be that difficult..
I thought I only need to change something so that the
$filename would reflect the
current value of
$cv.
Why can't it anyway? Anyone?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am working on device drivers.Once If register a device i'll get one major no. If i unregister and register again i'll get a different major no.What i have to do to get same major no. each time :( (0 Replies)
Discussion started by: Agnello
0 Replies
2. UNIX for Advanced & Expert Users
Does anyone know of a password reuse utility for Solaris 7 or 8? Security people are telling me that I need one.
Thanks (1 Reply)
Discussion started by: rtoba
1 Replies
3. HP-UX
Hello, I have 2 hp-ux both running 11.23, I have move one of a harddisk from "UNIX A" to "UNIX B", so how can I read back the data in "UNIX B"?
Thanks (5 Replies)
Discussion started by: zetadhell
5 Replies
4. Linux
hi
can you all help me to develop anything in unix that could be reused.
any module or application could be helpful (0 Replies)
Discussion started by: infyanurag
0 Replies
5. UNIX for Dummies Questions & Answers
I'm currently using zsh. Sometimes I find myself wishing to reuse an argument from earlier in the command.
I know that I can, of course, assign an argument to a variable ahead of time, and then easily use that variable more than once.
I know about the ability to reuse arguments from previous... (0 Replies)
Discussion started by: marshaul
0 Replies
6. Shell Programming and Scripting
Hello everyone.
I'm trying to create a conf file with variables that my other scripts will use.
I have several scripts that use the same variables, and since I don't know how to read them from an external file, i define them in each script (and then if i want to change one's value i need to... (4 Replies)
Discussion started by: moshe88
4 Replies
7. Emergency UNIX and Linux Support
I have a LUN (From HP-Storage VA7110) that is claimed on 2 servers, but is in used in one of the VG on Server-1 .
Now I want to shut Server-1 and re-use that LUN on server-2 .
Server-1
Path-1 : /dev/rdsk/c4t0d1
Path-2: /dev/rdsk/c6t0d1
Server-2
Path-1: /dev/rdsk/c5t0d1
Path-2:... (8 Replies)
Discussion started by: Shirishlnx
8 Replies
8. Shell Programming and Scripting
Hi
I am trying to write a shell script and wanted to re-use the value which I have entered already.
Here is the sample code.
echo "Enter Value : \c" ; read val
echo "Enter number: $val\c" ; read num
Now I wanted to change the value as showing in 2nd Line or if I will use enter, it... (15 Replies)
Discussion started by: SushilAnand
15 Replies
9. Solaris
Greetings.
First of all I consider myself a newbe in Linux, that's why I'm seeking your help so please be patient!
I was given an old server (Solaris) that has Oracle (10.2.0) installed with a few databases. I'm supposed to reuse this server for this new application which will process data... (11 Replies)
Discussion started by: RedSpyder
11 Replies
10. Programming
I have a collection of format strings for sscanf, such as
"%02d%*1s%02d%*1s%02d"
to read in certain formatted strings, such as dates, times, etc.
I wonder if there is a way to use them in printf without some changes? The example above would not work - at least I can't think of any ways to... (4 Replies)
Discussion started by: migurus
4 Replies
ECHO(3) 1 ECHO(3)
echo - Output one or more strings
SYNOPSIS
void echo (string $arg1, [string $...])
DESCRIPTION
Outputs all parameters.
echo is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo (unlike some other
language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want
to pass more than one parameter to echo, the parameters must not be enclosed within parentheses.
echo also has a shortcut syntax, where you can immediately follow the opening tag with an equals sign. Prior to PHP 5.4.0, this short syn-
tax only works with the short_open_tag configuration setting enabled.
I have <?=$foo?> foo.
PARAMETERS
o $arg1
- The parameter to output.
o $...
-
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
echo examples
<?php
echo "Hello World";
echo "This spans
multiple lines. The newlines will be
output as well";
echo "This spans
multiple lines. The newlines will be
output as well.";
echo "Escaping characters is done "Like this".";
// You can use variables inside of an echo statement
$foo = "foobar";
$bar = "barbaz";
echo "foo is $foo"; // foo is foobar
// You can also use arrays
$baz = array("value" => "foo");
echo "this is {$baz['value']} !"; // this is foo !
// Using single quotes will print the variable name, not the value
echo 'foo is $foo'; // foo is $foo
// If you are not using any other characters, you can just echo variables
echo $foo; // foobar
echo $foo,$bar; // foobarbarbaz
// Some people prefer passing multiple parameters to echo over concatenation.
echo 'This ', 'string ', 'was ', 'made ', 'with multiple parameters.', chr(10);
echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . "
";
echo <<<END
This uses the "here document" syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
END;
// Because echo does not behave like a function, the following code is invalid.
($some_var) ? echo 'true' : echo 'false';
// However, the following examples will work:
($some_var) ? print 'true' : print 'false'; // print is also a construct, but
// it behaves like a function, so
// it may be used in this context.
echo $some_var ? 'true': 'false'; // changing the statement around
?>
NOTES
Note
Because this is a language construct and not a function, it cannot be called using variable functions.
SEE ALSO
print(3), printf(3), flush(3), Heredoc syntax.
PHP Documentation Group ECHO(3)