10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wrote this code, questions follow
#! /bin/bash -f
# Purpose - to show how if syntax is used within an awk
clear;
ls -l;
echo "This will print out the first two columns of the inputted file in this directory";
echo "Enter filename found in this directory";
read input;
... (11 Replies)
Discussion started by: Seth
11 Replies
2. Shell Programming and Scripting
I am running a perl script and reading the arguments passed to the script as below..... resembles more arguments.
java weblogic.WLST /web/update.py 34 56 ....
I am trying to print the arguments passed to the update.py script as below
for arg in sys.argv:
print "other args:", arg... (1 Reply)
Discussion started by: mohtashims
1 Replies
3. Shell Programming and Scripting
Hello folks!
While "sedding" about again, I ran into this little conundrum du jour:#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
@ARGV = ('./afile.dat', './*.txt');
$^I = '';
while (<>)
{
s/Twinkies/Dinner/g;
print;
}When run, perl complains,...but, of... (1 Reply)
Discussion started by: LinQ
1 Replies
4. Shell Programming and Scripting
Hi ,
I need to match module data_tx_dig (
I tried matching
~m/module(\s+)ARGV(\s+)\(/ --> (generic code)but is not working.The same is able to match when i provide hardcoded value instead of passing from the command line.
~m/module(\s+)data_tx_dig(\s+)\(/ -->(hardcoded code).Please help me... (8 Replies)
Discussion started by: dll_fpga
8 Replies
5. UNIX for Advanced & Expert Users
All of my machines (various open source derivatives on x86 and amd64) store argv above the stack (at a higher memory address). I am curious to learn if any systems store argv below the stack (at a lower memory address).
I am particularly interested in proprietary Unices, such as Solaris, HP-UX,... (9 Replies)
Discussion started by: alister
9 Replies
6. Shell Programming and Scripting
Hi Expert,
Could you please explain why below two perl code get different result?
Thanks a lot.
sub test{
return (2,3,4,5,6,3,4,50);
}
($a,$b)=(test); # 3,6
($a,$b)=test; # 2,3 (2 Replies)
Discussion started by: summer_cherry
2 Replies
7. Shell Programming and Scripting
Hello
I have simple script that will accept as arg string like this :
".../foo/blah/,.../.../foo1/,.../blah"
now perl automatically removes the slashes "/" , I can't escape the slashes in the input I have to control on it
so how can I force perl to not touch this slashes?
Thanks ... (5 Replies)
Discussion started by: umen
5 Replies
8. Shell Programming and Scripting
this is in one of my scripts...
if ($#argv == 0) then
echo 'blah bla'
exit 0
endif
I want it to be something like this...
if ($#argv == 0 OR $argv >=3)
echo 'blah bla'
exit 0
endif
so when the arguments are none, or greater than three I want this "if then" to take over. how? I... (5 Replies)
Discussion started by: ajp7701
5 Replies
9. Shell Programming and Scripting
I have a script that asks a bunch of questions using the following method for input:
print "Name:";
while(<>){
chomp;
$name=$_;
}
So for example, if the questions asked for name, age, & color (in that order)... I want to be able to easily convert $ARGV into the input expected by... (2 Replies)
Discussion started by: jjinno
2 Replies
10. Shell Programming and Scripting
I am on HP-UX and I am trying to come up with a method to call in a list of files named like so.
filename020107.dat filename020207.dat filename020307.dat
Obviously I can list them ls them like so, ls filename*.dat. In case you did not notice the number is a date and I was hoping to match... (4 Replies)
Discussion started by: scotbuff
4 Replies