Search Results

Search: Posts Made By: ab52
Forum: Programming 11-06-2013
990
Posted By ab52
Perl and LDAP
Hi Perl Guys

I am in need of your knowledge as i am a complete newbie and perl

I need to do pull all the groups from LDAP , and then look at the GID's and if they are not set check for the...
Forum: Programming 06-18-2013
952
Posted By ab52
Perl email standout
Hi Perl Gurus

I am once again in need of your help

i have this lovely bit of code



for my $w (@$decoded_json) {
if ($w->{status} == 1){
print "Warning:\n";
printf "%-20s %-25s...
Forum: Programming 06-17-2013
3,707
Posted By ab52
Thanks for all the help last question ( i...
Thanks for all the help

last question ( i hope)


I have the following working



for my $w (@$decoded_json) {

printf "%-12s %-25s", $w->{client}, $w->{check} if $w->{status} == 1 ;...
Forum: Programming 06-17-2013
3,707
Posted By ab52
Thanks but using the output gives loads of...
Thanks

but using the output gives loads of extra info, i, e



com.dneg.graphite1.df.boot.df_complex.free OK
com.dneg.graphite1.df.root.df_complex.free OK
WARNING:...
Forum: Programming 06-17-2013
3,707
Posted By ab52
Perl array / json
Hi All

I have used the below code to print the dumper of a json


#!/usr/bin/perl

use LWP::Simple;
use JSON qw( decode_json );
use Data::Dumper;
use...
Forum: Programming 05-29-2013
2,152
Posted By ab52
Thanks for this it works great. Can you point out...
Thanks for this it works great. Can you point out the place in the code where i can adjust the date it looks for.


Thanks
A
Forum: Programming 05-21-2013
2,152
Posted By ab52
thanks guys wokrs like s charm
thanks guys wokrs like s charm
Forum: Programming 05-21-2013
1,525
Posted By ab52
Perl list of users
Hi All

i need to write something in perl that on a mac list all the users accounts, and then carries out a copy, ( rsync ) on each one it finds.

i was going to use glob, but i want to...
Forum: Programming 05-13-2013
2,152
Posted By ab52
Perl read file with dates in
Hi All

I have a text file that has a list of dates in it ( see below example) is there i can just pull out the lines that are from this week ( week starting on monday) and then work out the how...
Forum: Programming 05-08-2013
1,070
Posted By ab52
Perl Getopt::Long
Hi All

I am using Getopt::Long in perl and i am trying to have it so if i dont supply a switch after the progname is will do a defult option

i have the following


GetOptions($OPT,
...
Forum: Programming 04-29-2013
2,181
Posted By ab52
Thanks Last qustion :p I have managed...
Thanks

Last qustion :p

I have managed to read in the list of hosts into a file, i wanna see if i can ping the and then ones i can i want to use later for something else

Adam
Forum: Programming 04-29-2013
2,181
Posted By ab52
thanks that worked, list a treat, just two...
thanks that worked, list a treat, just two questions, if i wanted other fileds as well could i do this,




for my $host (@{$perl_data->{data}}){
print "$host->{hostname}\n";
print...
Forum: Programming 04-29-2013
2,181
Posted By ab52
Perl Array within an hash
Hi All

I have been using a curl code to output an hash that looks like this


$VAR1 = { ...
Forum: Programming 04-27-2013
6,581
Posted By ab52
sorry i an new to perl coding can you give an...
sorry i an new to perl coding can you give an example?

thanks
A
Forum: Programming 04-26-2013
6,581
Posted By ab52
Perl Json and Hash
Hi all, i am using the following code to that use curl to that outputs a json, i am stuck it into a hash but i canot figure out how to get just the value i need ( hostname)

here is my code

...
Forum: Programming 04-08-2013
1,719
Posted By ab52
Perl regex
Hi Guys

I have the following regex


$OSRELEASE = $1 if ($output =~ /(Mac OS X (Server )?10.\d)/);


output is currently

Mac OS X 10.7.5


when the introduction of Mac 10.8 output...
Forum: Programming 03-22-2013
1,391
Posted By ab52
sed it fine, i have not used it before like this,...
sed it fine, i have not used it before like this, can explain what is it doing?
Forum: Programming 03-22-2013
1,391
Posted By ab52
Perl find text and add line
Hi All

I need to add a line to a file but after a certain block of text is found

The block of text looks like this


<RDF:Description RDF:about="urn:mimetype:video/quicktime"
...
Forum: Programming 03-01-2013
2,187
Posted By ab52
Hi Thanks for your reply, i have this ...
Hi

Thanks for your reply, i have this



# Get command-line options
Getopt::Long::config(qw( permute bundling ));
my ($version,$help_flag);
my $OPT = {};
GetOptions($OPT, qw(
...
Forum: Programming 02-28-2013
2,187
Posted By ab52
Thanks. But is there a way not to do it with a...
Thanks. But is there a way not to do it with a hard code list. That mean every time we get a new version I will have to update it. If I could just take the version then i would not have to update i
Forum: Programming 02-28-2013
2,187
Posted By ab52
Perl parse string
Hi Perl Guys

I have another perl question

I have the following code that i have written


Getopt::Long::config(qw( permute bundling ));
my $OPT = {};
GetOptions($OPT, qw(
ver=s
...
Forum: Programming 02-28-2013
1,644
Posted By ab52
Sorry i was not clear, i want it to so me the...
Sorry i was not clear, i want it to so me the directories as well ( i,e everything in /data) but i want to exclude some of the results
Forum: Programming 02-28-2013
1,644
Posted By ab52
So the code will show me Eveything directories as...
So the code will show me Eveything directories as well. I want to exclude the directories called ( see below) from appearing.

Music
Old
OLD
3d
.
..
Forum: Programming 02-27-2013
1,644
Posted By ab52
Perl list file
Hi all

I am looking for a way to list files in a directoy using perl but then exlude some of the results

i've got this to list the files, but how can exclude some of the results

...
Forum: Programming 11-21-2012
1,900
Posted By ab52
i figure it out, my @rooms = split("...
i figure it out,

my @rooms = split(" ",$rooms);

works a charm

Thank for the help

Adam
Showing results 1 to 25 of 144

 
All times are GMT -4. The time now is 08:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy