Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Passing info from other file into command Post 302344006 by Paul.S on Friday 14th of August 2009 10:23:37 AM
Old 08-14-2009
When I run following command
Code:
#!/bin/sh

TAPE_LIST="usr/local/bin/archbakTST/BACKUP_TAPES"
. /$TAPE_LIST

echo "sudo -u root /usr/bin/rsh remote.server.com /opt/omni/bin/omnib -datalist "$tape_test_TEST" -mode full -lo
ad high"

Return is
Code:
sudo -u root /usr/bin/rsh remote.server.com /opt/omni/bin/omnib -datalist  -mode full -load high

and is missing
Code:
sudo -u root /usr/bin/rsh remote.server.com /opt/omni/bin/omnib -datalist [missing parameter here] -mode full -load high

and $tape_test_TEST is from following file which contains one line of datalist called "TESTDB3-TEST"

BACKUP_TAPES:
Code:
tape_test_TEST="TESTDB3-TEST"


Last edited by zaxxon; 08-17-2009 at 05:11 AM.. Reason: some more CODE tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

scripting: multiple values from file passing to command

one of my colleagues has this question. he has a command, C_CMD which accepts 4 variables, $1 $2 $3 $4 he wants to load up a file with multiple rows, one row per set of variables and then iteratively execute the command based on the content of the file. example: at the command line you'd... (5 Replies)
Discussion started by: LisaS
5 Replies

2. Shell Programming and Scripting

AT command parameter passing to php file

I have a bash script which utilizes a random function and then runs a file at now plus a random time. The problem is, that the php file requires a parameter after it eg: phpfile.php?code=123245b3 When i put in the file including the full path, with the at command, it will run, but not with... (1 Reply)
Discussion started by: thruxmore
1 Replies

3. Shell Programming and Scripting

Splitting a file in to multiple files and passing each individual file to a command

I have an input file with contents like: MainFile.dat: 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 ... (4 Replies)
Discussion started by: rkrish
4 Replies

4. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies

5. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

6. UNIX for Dummies Questions & Answers

passing command arguments from a file?

Hi Im trying to run zip shell command from an Oracle job, but this has limitations. This should take a few of explanaition,.. Oracle allows me to execute a command and then I can set up a fixed number of arguments. Ex: (summarizing in something like..): JOB DEFINITION job_name: test... (4 Replies)
Discussion started by: vegatripy
4 Replies

7. Shell Programming and Scripting

Create a file from ls -l command and append additional info to results

I need to be able to take the results from ls -l command and modify the output as follows: I will run ls -l *.mak My results will be aa.mak bb.mak cc.mak I then need to take those results and create a file that has the following info: dsjj/ubin/aa dsjj/ubin/bb dsjj/ubin/cc ... (3 Replies)
Discussion started by: jclanc8
3 Replies

8. Shell Programming and Scripting

Help with Passing the Output of grep to sed command - to find and replace a string in a file.

I have a file example.txt as follows :SomeTextGoesHere $$TODAY_DT=20140818 $$TODAY_DT=20140818 $$TODAY_DT=20140818I need to automatically update the date (20140818) in the above file, by getting the new date as argument, using a shell script. (It would even be better if I could pass... (5 Replies)
Discussion started by: SriRamKrish
5 Replies

9. Shell Programming and Scripting

Passing Shell variable from file to another command

Hi all, I have a file looks like AAAA 111 BBBB 222 CCCC 333 need to pass variable value like var1=AAAA and var2=111 to another command for three times with next values. stuck over here cat file | while read line do export var1=`awk '{print $1}'` echo $var1 export var2=`cat file... (3 Replies)
Discussion started by: rakeshtomar82
3 Replies

10. UNIX for Beginners Questions & Answers

Creating file and passing argument to a command

Hi All, I am having command to run which will take argument as input file. Right now we are creating the input file by cat and executing the command ftptransfer -i input file cat >input file file1 file2 cntrl +d Is there a way I can do that in a single command like ... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
INFO(5) 							File Formats Manual							   INFO(5)

NAME
info - readable online documentation DESCRIPTION
The Info file format is an easily-parsable representation for online documents. It can be read by emacs(1) and info(1) among other pro- grams. Info files are usually created from texinfo(5) sources by makeinfo(1), but can be created from scratch if so desired. For a full description of the Texinfo language and associated tools, please see the Texinfo manual (written in Texinfo itself). Most likely, running this command from your shell: info texinfo or this key sequence from inside Emacs: M-x info RET m texinfo RET will get you there. AVAILABILITY
ftp://ftp.gnu.org/pub/gnu/texinfo-<version>.tar.gz or any GNU mirror site. REPORTING BUGS
Please send bug reports to bug-texinfo@gnu.org, general questions and discussion to help-texinfo@gnu.org. SEE ALSO
info(1), install-info(1), makeinfo(1), texi2dvi(1), texindex(1). emacs(1), tex(1). texinfo(5). FSF
GNU Info INFO(5)
All times are GMT -4. The time now is 03:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy