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
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
LEARN ABOUT CENTOS
perl::critic::policy::inputoutput::prohibitbarewordfilehandles
Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHUsereContributed Perl DocPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles(3)
NAME
Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles - Write "open my $fh, q{<}, $filename;" instead of "open FH, q{<},
$filename;".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Using bareword symbols to refer to file handles is particularly evil because they are global, and you have no idea if that symbol already
points to some other file handle. You can mitigate some of that risk by "local"izing the symbol first, but that's pretty ugly. Since Perl
5.6, you can use an undefined scalar variable as a lexical reference to an anonymous filehandle. Alternatively, see the IO::Handle or
IO::File or FileHandle modules for an object-oriented approach.
open FH, '<', $some_file; #not ok
open my $fh, '<', $some_file; #ok
my $fh = IO::File->new($some_file); #ok
There are three exceptions: STDIN, STDOUT and STDERR. These three standard filehandles are always package variables.
CONFIGURATION
This Policy is not configurable except for the standard options.
SEE ALSO
IO::Handle
IO::File
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles(3)