10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to set "prd" in the below command to a unix variable
nawk '/^#/ {next} FNR==NR {prd;next} !($0 in prd)'
So, this is what i did
fname=prd // unix shell variable
nawk -v fname=$fname '/^#/ {next} FNR==NR {fname;next} !($0 in fname)'But the value of fname i.e "prd" is not... (8 Replies)
Discussion started by: mohtashims
8 Replies
2. Shell Programming and Scripting
Hi,
I only dip my toe into PERL programming on the odd ocassion so I was wondering if anyone had any ideas as to why the below is happening:
When I run my PERL script the variable values seem to get mixed up.
my $fileName = basename($maxFile,".TXT");
my $currentSeqNum =... (2 Replies)
Discussion started by: chris01010
2 Replies
3. Shell Programming and Scripting
Hi Guys,
I am stuck in a problem.
I have a variable in Perl script which has value for example
X=a-b-c;
Now, I want to extract a b c separately into different 3 variables. I know this can be done in shell using awk but Perl behaves a bit different.
Can anybody help me on this please?... (3 Replies)
Discussion started by: prashant2507198
3 Replies
4. Shell Programming and Scripting
dear,
I have below file called folderlist.txt
# ParentFolder environment_flag SubFolders
triss 1 checksum
bookstructure 1
fx 1 checksum_GMDB
I have a script which which will create the folders under... (3 Replies)
Discussion started by: manas_ranjan
3 Replies
5. Shell Programming and Scripting
hi all,
Assume that i a having the following three lines in an executable file
#/bin/bash
a=Tue
Tue=1
When i give echo $a the value should be 1, how to do this. Your suggestions please.
Thanks in advance,
Anish (4 Replies)
Discussion started by: anishkumarv
4 Replies
6. Shell Programming and Scripting
I am having trouble with a part of my substitute script I am using. I have it look through a file and find an exact match and then if it finds that match in the 1 file it should run the following 1 liner on 3 different files.
perl -pi -e 's/$CurrentName\s/$NewName/g' foo.cfg;
The issue that is... (8 Replies)
Discussion started by: Takau
8 Replies
7. Shell Programming and Scripting
I'm trying to efficiently combine the fields of two vectors (vectors b and c) into a new vector (vector d) as defined by instructions from a 3rd vector (vector a). So vector a has either a 1 or 2 in each field specifying which vector (b or c respectively) should go into that field. Vector a is... (4 Replies)
Discussion started by: LaTortuga
4 Replies
8. Linux
Hi,
Can you please help me of how to store the values into variables.
Here is the output in LINUX for the below command.
$free
output :
total used free
Mem: 3079276 3059328 19948
Swap: 1023992 6324 1017668
... (3 Replies)
Discussion started by: chittiprasad15
3 Replies
9. UNIX for Dummies Questions & Answers
Can anyone tell me what is the purpose of a substitute variable in the unix programming language and give an example where it may be used?
Thanks! (0 Replies)
Discussion started by: mmg2711
0 Replies
10. Shell Programming and Scripting
Hi,
I am trying to redefine the value of a variable based on another variable value. And I want to read in my variables from a enviroment file in the end -- at least I think so. But 1st here's what I want I need to get working:
var_1="11 10 9 8 7 6 5 4 3 2 1"
var_2=3
var_3=4
So I want... (12 Replies)
Discussion started by: John Rihn
12 Replies