Sponsored Content
Top Forums Shell Programming and Scripting Perl script :- Phone number validation Post 302409513 by durden_tyler on Thursday 1st of April 2010 10:53:04 AM
Old 04-01-2010
That's a Perl one-liner. Just execute it on your file as mentioned. The opening, closing etc. of the file is all done for you in a transparent fashion.

tyler_durden
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Date & NUmber Validation Query

Hi Do you have any pointers how to validate numbers (not to contain alphabets and special characters) and date(MM/DD/YYYY) format. I used following regular expression to validate integer, which is not working in the default shell: nodigits="$(echo $testvalue | sed 's/]//g')" ... (4 Replies)
Discussion started by: alok_jax
4 Replies

2. Shell Programming and Scripting

form validation with perl

Hey guys, I'm just messing around with a perl webpage. The idea is to make a simple validation form that will later insert a record into my DVD database. it's all very basic at the moment, and I worked up my script from the form validation example I found on this website:... (5 Replies)
Discussion started by: LNC
5 Replies

3. Shell Programming and Scripting

perl linux file name validation

Hi Everyone, #!/usr/bin/perl $a = ".a!"; if ($a =~ s///g) { print "invalid file name\n"; } else { print "valid file name\n"; } but the output is: Invalid range "_-." in regex; marked by <-- HERE in m// at ./a.pl line 5. the linux file name should be A-Z, a-z,... (8 Replies)
Discussion started by: jimmy_y
8 Replies

4. Shell Programming and Scripting

perl: How to improve with minimal validation of its input??

The Code: #!/usr/bin/perl use strict; use warnings; print "Please enter numbers, separated by commas: "; my $data=<STDIN>; chomp $data; my @dataset=split(/,/, $data); my $sum = 0; foreach my $num (@dataset) { $sum += $num; } my $total_nums = scalar(@dataset); my $mean =... (1 Reply)
Discussion started by: 300zxmuro
1 Replies

5. Shell Programming and Scripting

count number of entries perl program or Unix script

Hi I have a file with number of entries name 1 123 name 1 345 name 1 65346 name2 3243 name2 24234 name 2 234234 so on ......... how to count total number of entries for name 1 and name2...and so on Please guide. (1 Reply)
Discussion started by: manigrover
1 Replies

6. Shell Programming and Scripting

Getting phone number, its message and assigning them into 2 variables then screen output.

Hi Everyone, I have a flatfile "inbox.txt" which contains some information: Location 0, folder "Inbox", SIM memory, Inbox folder SMS message SMSC number : "+24800000023" Sent : Sat 04 Aug 2012 09:01:00 PM +0700 Coding : Default GSM alphabet... (5 Replies)
Discussion started by: testcase
5 Replies

7. Shell Programming and Scripting

Number of arguments to array - Perl Script

I have the following proc. proc get_add {arg1 arg2 arg3 arg4 arg 5 .. ... arg N } { } i need to count the number of arguments and also i need those arguments stored in an array. please help out ---------- Post updated at 06:33 PM ---------- Previous update was at 05:30 PM ---------- ... (1 Reply)
Discussion started by: Syed Imran
1 Replies

8. Shell Programming and Scripting

Editing phone number with multiple delimiters

Hello all I have a data base of information that is formatted like so: JSD4863 XXX-XX-XXXX DOE, JOHN C JR-II BISS CPSC BS INFO TECH 412/779-9445 I need the last four digits of the phone number. However, many lines contain 'garbage data' that I'm not interested in. So i used a 'for loop'... (7 Replies)
Discussion started by: smartSometimes
7 Replies

9. Web Development

Auto phone number search

Hi. I want to search 10 phone numbers automatically in Facebook and store the result in some format. Can anyone help me with the script. I am using kali Linux. (2 Replies)
Discussion started by: looksthatmatter
2 Replies
pthread_cleanup_pop(3T) 												   pthread_cleanup_pop(3T)

NAME
pthread_cleanup_pop(), pthread_cleanup_push() - remove or register a cancellation cleanup handler SYNOPSIS
PARAMETERS
routine Routine registered as a cancellation cleanup handler. arg Parameter to be passed to the cancellation cleanup handler execute Indicates if the popped cancellation cleanup handler is to be executed. DESCRIPTION
installs the cancellation cleanup handler routine onto the calling thread's cancellation cleanup stack. This handler will be popped from the calling thread's cancellation cleanup stack and called with the arg parameter when any of the following occur: (a) the thread calls or returns from its start routine. (b) the thread acts upon a cancellation request. (c) the thread calls with a non-zero execute argument. When a thread terminates, it will execute each of the cancellation cleanup handlers on its cancellation cleanup stack. These handlers will be popped and executed in the reverse order that they were installed ( removes the cancellation cleanup handler at the top of the calling thread's cancellation stack. If execute is non-zero, the cancellation cleanup handler is called after it is removed from the cancellation stack. If execute is zero, the cancellation cleanup handler is simply removed and will not be called. and must appear as statements and in pairs within the same lexical scope. These functions may be macros which contain the opening '{' in the push function and the closing '}' in the pop function. Calling or is undefined if there have been any calls to or made without the matching call since the jump buffer was filled. Calling or from inside a cancellation cleanup handler results in undefined behavior unless the corresponding or was also done inside the cancellation cleanup handler. RETURN VALUE
The and functions must be used as statements. They do not have return values or errors. ERRORS
None. WARNINGS
The functions and must be called in the same lexical scope or the result is undefined behavior. AUTHOR
and were derived from the IEEE POSIX P1003.1c standard. SEE ALSO
pthread_cancel(3T), pthread_setcancelstate(3T). STANDARDS CONFORMANCE
Pthread Library pthread_cleanup_pop(3T)
All times are GMT -4. The time now is 08:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy