Sponsored Content
Top Forums Shell Programming and Scripting variable vlaues in other files Post 52091 by zazzybob on Wednesday 9th of June 2004 05:05:04 PM
Old 06-09-2004
A lot of commands will accept their input redirected from a file, e.g.

somecommand < some_file

In your case, however, I think something like

alt_disk_install -C `cat file_name`

would be more appropriate.

Cheers
ZB


EDIT: Sorry Jim, must have been typing my post whilst you were typing yours, hence the overlap in content!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

appending variable number of files

In a particular path of a server I have number of files.The files are generated every date with a date_mth stap on this.There are different files for different clients. For example in /data1 path i have X_0416_Score Y_0416_Score Z_0417_Score X_0417_Score A_0417_Score If i will run the... (1 Reply)
Discussion started by: dr46014
1 Replies

2. Shell Programming and Scripting

How to assign files to variable

Hi All, I have many files in a directory. I want to assign these files to variable. For example: In home directory I have files called a.dat, b.dat, c.dat, e.dat and so on.... I want to assign all these files to varibale. How can I do that? Thanks (2 Replies)
Discussion started by: Bhanu72
2 Replies

3. Shell Programming and Scripting

How to search the files with the value in a variable

Hi Am taking a value in a variable and i have to use that in listing files using grep like ls -ltr | grep "$variablename" filename... but the variable contains spaces in it and i am not able to get the correct value(i.e., wid spaces) if the variable has "day 2"(wid 2 spaces) in it am... (13 Replies)
Discussion started by: sparks
13 Replies

4. Shell Programming and Scripting

loop through two files based on a variable

Hi guyz. i have two files. based on keys(chr1, chr2..) it has to loop through the second file of the same keys and has to take the minimum number after substraction. Sorry if I made my question complicated. file1 chr2 1989 chr2 2500 chr1 1500 file 2 chr1 1339 chr2 2000 chr2 3000... (20 Replies)
Discussion started by: nogu0001
20 Replies

5. Shell Programming and Scripting

variable number of input files

Hi all, I'm an extremely newbie with unix/perl. I have a perl script that I need to run on a variable number of input files (i.e., I have to run the perl script on each file, but from run to run, I have a different list of files that need to be put through this script). I think this can... (2 Replies)
Discussion started by: sunmatrix
2 Replies

6. Shell Programming and Scripting

List files to variable

Hi, I have a variable that I use in a for loop :- files="`ls -t /usr/dw/apps/work/PROJECT_NEW/SrcFiles/$1/*.txt | head -1`" This picks up *.txt files in a directory based upon the last modified date .. This variable is called in the loop to process files which are then archived. I want... (1 Reply)
Discussion started by: jmahal
1 Replies

7. Shell Programming and Scripting

function for variable files

hi all this is my function #! /bin/sh awk '/ Type/ { print "m;" $4 } /IDf/ {print $3 } /IuSac/ { print $3 } /IuSac/ { print $1 }' / IBM.txt |tr '\n' ';'| perl -pi -e 's/;m//g'|cut -d ";" -f 2-5 ' >> 2m 1) i wanna make it to save output of awk in a file named by date in order not to... (3 Replies)
Discussion started by: teefa
3 Replies

8. Shell Programming and Scripting

Replacing variable is files in same directory

Hi all, I'm writing a script to get values from the user and replace it in another file in the same directory. /usr/bin/sediff 's/$PROJECT/'$PROJECT'/' /ananth/TEMPLATE TEMPLATE is the file I want to replace the variable PROJECT from the script I'm writing but Im not getting it done. Is... (4 Replies)
Discussion started by: Ananthdoss
4 Replies

9. UNIX for Dummies Questions & Answers

Moving files to a folder with a variable name

hello there- first post here- maybe someone can help- Basically I am trying to copy the contents of a folder to a different folder that has a variable name. the content I want to copy would be in a folder on my desktop called: myfolder the variable folder would look something like: ... (3 Replies)
Discussion started by: infothelonghaul
3 Replies

10. UNIX for Dummies Questions & Answers

Stack data from multiple files into one, with variable column files

Hello Gurus, Im new to scripting. Got struck with a file merge issue in Unix. Was looking for some direction and stumbled upon this site. I saw many great posts and replies but couldnt find a solution to my issue. Greatly appreciate any help.. I have three csv files -> Apex_10_Latest.csv,... (1 Reply)
Discussion started by: wamshi
1 Replies
asadmin-multimode(1AS)													    asadmin-multimode(1AS)

NAME
asadmin-multimode, multimode - allows you to execute multiple commands while preserving environment settings and remaining in the asadmin utility SYNOPSIS
multimode [--file filename] [--printprompt=true] [--encoding encode] [--terse=false] [--echo=false] Use multimode to process the asadmin commands. The command-line interface will prompt you for a command, execute that command, display the results of the command, and then prompt you for the next command. Additionally, all the asadmin option names set in this mode are used for all the subsequent commands. You can set your environment and run commands until you exit multimode by typing "exit" or "quit." You can also provide commands by passing a previously prepared list of commands from a file or standard input (pipe). You can invoke multimode from within a multimode session; once you exit the second multimode environment, you return to your original multimode environment. This command is supported in local mode only. --file reads the commands as defined in the file. --printprompt allows the printing of asadmin prompt after each command is executed. Set this option to false when the commands are piped or redirected from the standard input or file. By default the option is set to true. --encoding specifies the locale for the file to be decoded. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on to the standard output. Default is false. Example 1: Using multimode to execute multiple commands example% asadmin multimode --file commands_file.txt Where: example% is the system prompt. The multimode settings are executed from the commands_file.txt file. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-export(1AS), asadmin-unset(1AS) J2EE 1.4 SDK March 2004 asadmin-multimode(1AS)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy