Sponsored Content
Full Discussion: Help Needed Perl
Top Forums Shell Programming and Scripting Help Needed Perl Post 302317937 by john_prince on Wednesday 20th of May 2009 09:36:40 AM
Old 05-20-2009
Apparently, the script should check for either a null value OR satisfy telephone format ( xxx-xxxx). Like "22" is not a correct phone format, so the output should be null.

I really appreciate your effort.

Regards,
Prince
 

10 More Discussions You Might Find Interesting

1. AIX

Perl.rte needed..

Hello I was installing ssh in Aix 4.3 but found that "perl.rte and rpm.rte" was not installed. but to my bad luck i was not able to find these packages for Aix 4.3. Ibm site just has these packages only for 5L. Can anyone help me in finding these packages. Bala (1 Reply)
Discussion started by: balaji_prk
1 Replies

2. Shell Programming and Scripting

different result on shell and on perl HELP NEEDED

hi i am using this command which would return to be the filename ls -l $dir1 | awk '{print $9}' however on perl when i use: `ls -l $dir1 | awk '{print \$9}' > tmp` it gives me a different result. Everything is the same however a directory does not contain the the forward slash so i... (2 Replies)
Discussion started by: nookie
2 Replies

3. Shell Programming and Scripting

Perl - help needed

Hi all, I'm a rookie in Perl scripting, and I have a task to do. Generally it's something like that: I have a reference file consisting of a number and name, tab-separated. One entry in one line, about 99 lines in file. The other file is an XML log file, where in one specific branch, eg.... (8 Replies)
Discussion started by: tklich
8 Replies

4. Shell Programming and Scripting

Perl Script Help Needed

I need this script to be able to check both IPs that are given to it and exit with an OK... if one of those expected IPs is returned. The script is run like this: /bin/dns_checker.pl -s 69.34.55.66 -q htt.jababa.com -e 69.44.56.33,45.47.43.55 Right now, the script is failing, but when I... (4 Replies)
Discussion started by: SkySmart
4 Replies

5. Shell Programming and Scripting

Perl script help needed..

Hi, I am new to perl scripting. Can anybody help me in solving the below problem. I have file, which is called map_file. According to map_file's last column data, i need a output file, which has repeats as like the map_file's last column name. Thank you in advance Vasanth (5 Replies)
Discussion started by: vasanth.vadalur
5 Replies

6. Shell Programming and Scripting

Perl command help needed

#!/bin/bash perl -nle' /(?:date|time|ref)/ and print join " ", /(?:date|time|ref)+/g or print ' inputfile Problem I have is that I want to delete words that are on the line of the 3 words above (date, time, and reference). However, I do not want to delete the words... (9 Replies)
Discussion started by: linuxkid
9 Replies

7. Shell Programming and Scripting

Perl script needed

For the following command I need a perl script equivalent with a couple of more things - cat /tmp/mail |grep Appname > /tmp/mail1;cat /tmp/mail >> /tmp/mail1; mail -s "mail subject here" allan@mail.com < /tmp/mail1; >/tmp/mail ; >/tmp/mail1 ================== cat /tmp/mail ***** Alert *****... (4 Replies)
Discussion started by: jacki
4 Replies

8. Shell Programming and Scripting

Help needed with Perl Script

i have the following script: #!/usr/local/bin/perl use STUN::Client; use Data::Dumper; use strict; my $stun_client = STUN::Client->new; $stun_client->stun_server('10.59.29.14'); my $r = $stun_client->get; my $ip = $r->{ma_address}; print "IP: $ip\n\nResult (hash):... (5 Replies)
Discussion started by: SkySmart
5 Replies

9. Shell Programming and Scripting

perl regex help needed

Hi, I want to validate strings in perl, the string may contains characters from a-zA-Z0-9 and symbols +-_.:/\ To validate such a string I computed a regex if ($string =~ m/^/) { print "valid"; } else { print "invalid"; } but this regex also validates strings that contain... (8 Replies)
Discussion started by: zing_foru
8 Replies

10. Shell Programming and Scripting

PERL help needed

Hi, I will be asking a series of major newbie questions, and you help is greatly appreciated in advance!! I have to write a script that will parse a logfile in a directory, the directory name changes daily. So far I have: #!/usr/bin/perl open LOGFILE,">logfile.txt"; ($day, $month,... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies
callerid.conf(5)					    Linux System Administration 					  callerid.conf(5)

NAME
/etc/isdn/callerid.conf - config file for isdnlog numbers and scripts FORMAT
This file has the format described in isdnformat(5). It must be owned by root, and only root may have write access. Every user can create his private telephone book as ~/.isdn with the same file format. VARIABLES SECTION
Like in isdn.conf, this file has an optional [VARIABLES] section. All variable names must be uppercase. Warning: variables in callerid.conf will override variables in isdn.conf, and variables in ~/.isdn will override variables in both files. First all variables are read, then they are substituted, so a variable defined in ~/.isdn can be used in isdn.conf. This might be a security hole. However, if programs are to be run as root, these files (and the program) cannot be writeable for non-root users. Using variables: if a reference to a non existing variable is used, isdnrep and isdnlog will give warning messages, and use the variable name (e.g if $FRED isn't set, isdnlog will use "$FRED"). The dollar sign can be backslashed if a real dollar sign is needed instead of variable substitution (e.g. $PATH will be "$PATH"). NUMBER and MSN In [NUMBER] sections, you can supply information for the outer world, in [MSN] sections; you can supply information about your msns. The format is the same: NUMBER=xxxx Set the telephone number. This should be your msn or the telephone number with area code (with or without areprefix, countrycode and countryprefix) SI=x Service indicator. Isdnlog knows these service indicators: 1 speech (telephone, fax g3, modem etc.) 2 restricted digital information 3 unrestricted digital information with tones/announcements 4 video 7 unrestricted digital information (hdlc, x.75 etc.) Alias=xxxx Supply a name as alias (e.g. ALIAS=Fred's Number) ZONE=xxx Only useful with remote numbers: billing zone for connections to this number: 0 internal connection in your s0 bus (no charge) 1 city area 2 region 50 3 region 200 4 far region 5 the same as 1 INTERFACE=xxx Isdn network interface. This information is required with the "-hx" / hangup="value" option. START You can define a subsection here. The whole section is ignored unless you gave the "-S" / start=yes option. Each subsection should have the name [FLAG]. It may hold these values: FLAGS=x|y|z Combine these flags (with or without the pipe "|" char; with is preferred) to get the combination you want: Part 1: Incoming and Outgoing I Incoming call O Outgoing call Part 2: Signals from isdn system C Connect (can be used with interval, see below) B Busy E Error R Ring (can be used with interval, see below) A AOCD (advice of charge signal) H Hangup Part 3: Modifiers L Start the program again and again every time it terminates. U Start the program only once within a interval. Without this, several instances of a program can run in parallel. (Interval required.) K Kill program at the end of the interval. USER=xxx Isdnlog will not run programs as root, and will switch to a different user id for security. You must give the name or uid of the user isdnlog has to use here. GROUP=xxx Isdnlog will not run programs as group root, and will switch to a different group id for security. You must give the name or gid of the groups isdnlog has to use here. TIME=xx Restrict this flag to a special time. Pleas read isdntime(5). INTERVAL=xx With connect (C) or ring (R) flag you can specify an interval, so isdnlog will start the program after every interval. The interval is in seconds and should be at least 2 seconds. If the flags do not include C or R, this option is ignored. PROGRAM=xxx The program you want to start, with the required arguments. You may use the following special tokens: $1 flags that caused execution, e.g. "IR", "OC". There are always exactly two characters. $2 Caller number (complete with area code). $3 Called number (complete with area code). $4 Time the connection started. Example: "Wed May 28 23:07:44 1997". Contains "?" if there is no connection yet (e.g. still at RING phase). $5 Duration of connection up to now (in seconds). $6 Time the connection ended. Same format as $4. $7 Number of input bytes. $8 Number of output bytes. $9 Input bytes per second. $10 Output bytes per second. $11 Service indicator. $12 Charges. $13 Caller country code. $14 Called country code. $15 Caller area code. $16 Called area code. $17 Caller town (derived from area code). $18 Called town $19 Caller alias. $20 Called alias. Note: within a string you must use ${1} ${2} ... FILES
/etc/isdn/callerid.conf This file. ~/.isdn Per user telephone book. SEE ALSO
isdnlog(8) isdnformat(5) isdntime(5) AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux. ISDN 4 Linux 3.1pre4 2000/09/15 callerid.conf(5)
All times are GMT -4. The time now is 05:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy