(Problem) Script with Parameters file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting (Problem) Script with Parameters file
# 1  
Old 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!
# 2  
Old 08-04-2008
What is your hostname? and could you please tell what exactly you are trying to set ? i mean what exactly you expect in result. ?

-nilesh
# 3  
Old 08-04-2008
Yes, my hostname is aix53 and the result i want is:
/temporal/aix53.mksysb.040808

The actual result is all the variable line:
aix53_DESTINATION="/temporal/aix53.mksysb.040808" Smilie
Thx
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read Parameters from one file and make a script

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

2. Shell Programming and Scripting

Shell Script to Dynamically Extract file content based on Parameters from a pdf file

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

3. Shell Programming and Scripting

Problem with input parameters

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

4. Shell Programming and Scripting

Script Send Mail by Parameters avec Attached file

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

5. Shell Programming and Scripting

Calling sql file from shell script with parameters.

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

6. Shell Programming and Scripting

Problem with parameters ( $1, $2... )

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

7. Shell Programming and Scripting

Problem with Input parameters

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

8. UNIX for Dummies Questions & Answers

Problem with Input Parameters using Shell Script

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

9. Shell Programming and Scripting

Problem with script not able to take parameters passed to it

debug output: (3 Replies)
Discussion started by: dsravan
3 Replies

10. Shell Programming and Scripting

Problem with script not able to take parameters passed to it

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
Login or Register to Ask a Question