08-04-2008
(Problem) Script with Parameters file
Hello, this is my first post, and.... obviusly, i have a problem, i have this script:
#!/bin/sh
. /tmp/variables
...
...
DESTINATION=`hostname`_DESTINATION
...
and the /tmp/variables has:
#!/bin/sh
aix53_DESTINATION="/temporal/`hostname`.mksysb.`date +\%d\%m\%y`"
**
The problem is that when i ran the script, the result of the variable DESTINATION is aix53_DESTINATION="/temporal/aix53.mksysb.040808, i want that the result were /temporal/aix53.mksysb.040808, somebody knows how to do that?.
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when I pass any 2 parameters it always says:
Number of parameters passed: 1
and the job_name as x
Can some body help? (7 Replies)
Discussion started by: dsravan
7 Replies
2. Shell Programming and Scripting
debug output: (3 Replies)
Discussion started by: dsravan
3 Replies
3. UNIX for Dummies Questions & Answers
i have this basic code that accepts for two input one for the source file and the other is for the target directory. basically it is a simple copy command. the problem is at the end of the execution the second parameter string was passed to first parameter and it displays a message like:
cp:... (3 Replies)
Discussion started by: wtolentino
3 Replies
4. Shell Programming and Scripting
Hi,
I am facing a weird problem with input parameters. Please find more details about my problem below:
a) I am executing a korn shellscript with 11 input parameters from "Appworx" tool (it's a scheduling tool) and immediately displaying those 11 parameter values in unixscript and noticed... (4 Replies)
Discussion started by: npk2210
4 Replies
5. Shell Programming and Scripting
I have problem with params...I have created a script, which needs a path to PDF file as parameter.
for instance:
sh myScript.sh $HOME/myPdf.pdf
the problem is, when the PDF's name is not just myPDF.pdf but my pdf.pdf...I want to say, that the name of the PDF is separated by spaces, and... (2 Replies)
Discussion started by: Lukasito
2 Replies
6. Shell Programming and Scripting
Hi,
I am calling a sql file script.sql from shell script and passing few parameters also as shown below:
sqlplus -S id/password @script.sql $param1 $param2
Now,In sql file I have to create a extract text file after querying oracle tables based on the parameters passed(param1,param2) as... (7 Replies)
Discussion started by: anil029
7 Replies
7. Shell Programming and Scripting
Hi i have a script for show the information files. ls -l
how do you for to place this result in a file of text and to send it attached for e-mail.
The information of the mail must be in paramentros. for example e-mail to I must write the e-mail, the subject and the motive of the mail!
... (1 Reply)
Discussion started by: krlos07
1 Replies
8. Shell Programming and Scripting
Hi
I wrote a script which lists the content of a given directory.
I have just one problem. If you give 2 or more parameters, then it gives a strange error. After that error, it gives also an error from my script, but normally it shouldn't give that error.
Here's my script.You can test it.
... (3 Replies)
Discussion started by: hss
3 Replies
9. Shell Programming and Scripting
Hi Guru's,
I am new to shell scripting. I have a unique requirement:
The system generates a single pdf(/tmp/ABC.pdf) file with Invoices for Multiple Customers, the format is something like this:
Page1 >> Customer 1 >>Invoice1 + invoice 2 >> Page1 end
Page2 >> Customer 2 >>Invoice 3 + Invoice 4... (3 Replies)
Discussion started by: DIps
3 Replies
10. Shell Programming and Scripting
Hi Friends,
I have the following input parameters file
name
input
err1
out1
1
40G
DET
sylamer
dir1
dir2
123456
I want to make the following script
#!/bin/bash
# (5 Replies)
Discussion started by: jacobs.smith
5 Replies
resize(1X) resize(1X)
NAME
resize - set TERMCAP and terminal settings to current xterm window size
SYNOPSIS
resize [-u] [-c] [-s[row col]]
OPTIONS
The following options may be used with resize: This option indicates that Bourne shell commands should be generated even if the user's cur-
rent shell is not /bin/sh. This option indicates that C shell commands should be generated even if the user's current shell is not
/bin/csh. This option indicates that Sun console escape sequences will be used instead of the special xterm escape code. If rows and col-
umns are given, resize will ask the xterm to resize itself. However, the window manager may choose to disallow the change.
DESCRIPTION
The resize command prints a shell command for setting the TERM and TERMCAP environment variables to indicate the current size of xterm win-
dow from which the command is run. For this output to take effect, resize must either be evaluated as part of the command line (usually
done with a shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh),
the following alias could be defined in the user's
% alias rs 'set noglob; eval `resize`'
After resizing the window, the user would type: % rs
Users of versions of the Bourne shell (usually known as /bin/sh) that do not have command functions will need to send the output to a tem-
porary file and the read it back in with the "." command:
$ resize > /tmp/out
$ . /tmp/out
FILES
for the base termcap entry to modify. user's alias for the command.
BUGS
The -u or -c must appear to the left of -s if both are specified.
SEE ALSO
csh(1), tset(1), xterm(1X)
AUTHORS
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
Copyright (c) 1984, 1985 by X Consortium
See X(1X) for a complete copyright notice.
resize(1X)