Hi, My script to add a new user is below, written on solaris 10. Running it using either of these two ways (one with double quotes around the second parameter...
... Hi! First of all, you shouldn't use $ARGV[0] , $ARGV[1], etc. directly. Do: {{{ my ($first_name, $last_name, $address) = @ARGV; }}} Which is a much more...
Thanks very much for the advice on not using $ARGV's directly. I will change my code to match. But I'm not sure how your example of system("echo"...) applies...
... It's not $ARGV - it's @ARGV. @ARGV is the entire array. $ARGV[$index] is an individual element of it. There's also $ARGV in Perl which is a different ...
Hi Regina, The problem is caused by the eval shell statement: eval "exec ctperl -S $0 $*" When the shell runs your shell script, the quotation marks have...
This worked! Thank you so much! But now I'm having trouble passing my embedded-space-parameter on to the useradd routine. Here is my current code. The...
... rmiller571957> But how can I pass it on to the useradd command as one parameter? As Shlomi Fish already showed you before... using a multi-arg system...
Thank you! And Shlomi, I'm sorry I didn't understand your response. I played with it for about 10 minutes, but just didn't see how it fit in with my...
Hello.. I am writing a perl program in windows.. Here is my problem. I have a file containing data such as: Apples Oranges Pears Bananas Plums Apples Oranges ...
... Kevin> I write a program to read this file and create a summary report showing Kevin> How many apples: Kevin> How many oranges Kevin> How many Pears ...
What is the exact format of the file? What have you tried so far? Nobody is going to write the script for you. The group is here to help you figure things out...
Sorry... Here is what I wrote: #!/usr/bin/perl #use warnings; #use diagnostics; my $count = 0; my $key_count = 0; $Input_File="crapdata1.txt"; open(INP,...
Hi, I am writing a perl program to call/ execute another windows program Using the system command. I am trying to get/print the results to see if the command...
... Try opening the the command with a piped file handle, like so... the below example will execute a given command and print the output to the screen (you...
Dan Stephenson
ispyhumanfly@...
Jun 24, 2009 1:55 am
Maybe the backtick operator ` `? (Backtick on my keyboard is the tilde key ~ without shift, but it might be different on your keyboard). ... You'd do my...
Jeff Soules
soules@...
Jun 24, 2009 4:58 pm
I TRIED IT THIS WAY.. INCLUDING WITH THE BACK LASHES. But I still get nothing.. And I show nothing ran in task manager.. open my $command, "e:\BMC...
When executing this command, don't forget to redirect the STDERR to STDIO, else you won't be able to figure out the reason why command has failed, so i will...
... In that case, make sure you use String-ShellQuote: http://search.cpan.org/dist/String-ShellQuote/ Alternatively use open '-|', @list which is only...
You've had prior experience with other programming languages, right? Using substr() this way is a very C or Java way of doing things. Read up on hashes...
Jeff Soules
soules@...
Jun 17, 2009 8:46 pm
Thanks. I am reading on hashes now and practicing on how to use them. I have not taken any perl classes.. I just started reading the books. From:...
... If you're learning from books, I cannot recommend _Learning_Perl_ highly enough. It's got a very intelligent presentation order, tons of useful example...
Jeff Soules
soules@...
Jun 17, 2009 8:54 pm
Thanks. I have it on order and reading it online now.. From: perl-beginner@yahoogroups.com [mailto:perl-beginner@yahoogroups.com] On Behalf Of Jeff Soules ...
Ok. Im stuck again. I need to sort this input file below before my code.. Cant someone help me with this?? ... <mailto:perl-beginner%40yahoogroups.com> ...
In a Unix environment, the easiest way to sort the file would be to use the sort utility on the file. But you said you're running in Windows. So, since your...
Jeff Soules
soules@...
Jun 18, 2009 12:22 pm
Hope this helps Output: Apples count is: 3 Oranges count is: 3 Pears count is: 3 Src: #!/usr/bin/perl use strict; use warnings; my $count = 0; my...
... Kevin> I have it on order and reading it online now.. I hope by "reading it online" you mean you have a safari.oreilly.com account (or access to it through...
Hi, try to have a hash containing the frequencies. IMHO it is not a Perl issue. Get some info on algorithms Gabaux ... Hello.. I am writing a perl program in...
# cat add_smbuser #!/sbin/sh # This script must be invoked each time a new user # is added to the UB-Domain (SAM), so he will find his home and # a backup...