06-09-2004
variable vlaues in other files
lets say i have a command with arguments i.e.
alt_disk_install -C hdisk1
the argument being hdisk1
this could be differnt depending on what server your on
how could i have this be a variable that refers to this value in a file
something like
alt_disk_install -C valueinfile
so basically i create a file that contains the name of the disk i want to use, and this script refers to that file for its value
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
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
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