03-26-2013
I'm not used to perl, but this works nicely. Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to pass a filename, or all the files in the current directory to the ls command with a script. Unsuccessful so far, here are a few of my attempts:
#!/bin/ksh
read fname
#if (( $# > 0 )); then
$fname | ls -l
#fi
this produces a long listing of all the files in my current... (4 Replies)
Discussion started by: jpprial
4 Replies
2. UNIX for Dummies Questions & Answers
Is it possible to pass a string as an argument from the command line?
I know I can pass a word in but can I put a line of text in with spaces and fullstops or do I just put it in brackets or quotes so the compiler can differinate between the first argument and the second. (1 Reply)
Discussion started by: iago
1 Replies
3. Shell Programming and Scripting
Hi,
I have a script which adds the user credentials to an ldap server. Im passing the variables as below..
/path/my_script $uname $pwd $environ ${deposit}
If i enter some special characters like ';' in $pwd, script returns an error which is set to display if the user enters... (5 Replies)
Discussion started by: Tuxidow
5 Replies
4. Shell Programming and Scripting
Hi
I have a script to which I pass multiple arguments, for example lets say the script name is "abc". I run the script like
./abc def /file <directory location>
In the above "def" is the first argument and "/file" is the second argument. I expect <directory location> that is passed after... (4 Replies)
Discussion started by: zmfcat1
4 Replies
5. Shell Programming and Scripting
I have an awk script below which I call using for example
awk -f ../../A-Scripts/select-model.awk iterations.txt 16x12 10
I want to be able to use it in a different way like this
awk -f ../../A-Scripts/select-model.awk iterations.txt nxz=16x12 iter=10
or
awk -f... (1 Reply)
Discussion started by: kristinu
1 Replies
6. UNIX for Dummies Questions & Answers
I need to pass arguments to a shell script.My batch is calling some java program.
#################
x=$1
y=$2
java -classpath program
###################
if first parameter and second parameter is null then
java -classpath program
if first parameter is not null and second parameter is... (3 Replies)
Discussion started by: mnjx
3 Replies
7. Shell Programming and Scripting
I have noticed this thing using csh when passing arguments
Suppose I call a csh script using
../Scripts/plot-model.csh -vmod="npt02-z30.vmod" -R="0/80/0/30" -c="0/4.5" -aspr="1:10"
Somehow the " get removed when doing
$argv
ending up with
-vmod=npt02-z30.vmod... (0 Replies)
Discussion started by: kristinu
0 Replies
8. Shell Programming and Scripting
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Discussion started by: goddevil
19 Replies
9. Shell Programming and Scripting
Hi,
i have a file.txt with data
Bangalore
Chennai
Hyd
filename of the script is: new.sh
result=`cat file.txt | grep $1`
if
then
echo pass
else
echo fail
fi
i am executing the file in the cmd line as "sh new.sh Bangalore"
o/p is pass
if i give "sh new.sh delhi"
o/p is... (6 Replies)
Discussion started by: harsha85
6 Replies
10. Shell Programming and Scripting
hi All,
i am trying to pass arguments that contain space , value will be stored in variables to be used further in script , i went thru previous posting , still its not clear to how to implement for my case.
passing 3 args
test.sh it is 'fun to work in unix'
inside shell
... (3 Replies)
Discussion started by: gvkk
3 Replies
LEARN ABOUT X11R4
perlmacos
PERLMACOS(1) Perl Programmers Reference Guide PERLMACOS(1)
NAME
README.macos - Perl under Mac OS (Classic)
SYNOPSIS
This document briefly describes perl under Mac OS (Classic). If you are running perl under Mac OS X, you don't want to be here (unless you
are in the Classic environment under Mac OS X).
When we say "Mac OS" below, we mean Mac OS 7, 8, and 9, and not Mac OS X.
DESCRIPTION
The latest perl source itself builds on Mac OS, with some additional pieces. Support for Mac OS is now in the perl core, and MacPerl is
kept in close sync with regular perl releases.
To build perl for Mac OS (as an MPW tool), you will need the addition of the macos subdirectory, distributed separately. It includes extra
source files, config files, and make files. It also includes extra Mac-specific modules.
To build the MacPerl application, you will also need the macperl directory, which includes the source files for creating the application
itself.
All of this is available from the development site, via HTTP (in the MacPerl Installer, which includes all the source and binaries) and
anonymous CVS.
http://dev.macperl.org/
The source is also in the main perl repository in the macperl branch (the 5.6 source is in the maint-5.6/macperl branch).
You will also need compilers and libraries, all of them freely available. These are linked to from the SourceForge site. Go that site for
all things having to do with MacPerl development.
MacPerl 5.6.1 and later are supported on Mac OS 8.1 and later, for 68040 and PowerPC architectures. The MPW tool may be used on Mac OS
7.5.5 and 68030 computers.
MacPerl 5.2.0r4 is also available, on the CPAN and on SourceForge. It is based on perl 5.004, and works with Mac OS 7.5.5 and 68030 com-
puters.
AUTHOR
perl was ported to Mac OS by Matthias Neeracher <neeracher@mac.com>. It is currently maintained by Chris Nandor <pudge@pobox.com>.
DATE
Last modified 2002.05.02.
perl v5.8.9 2007-11-17 PERLMACOS(1)