LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2015, 02:12 AM   #1
prasad1990
LQ Newbie
 
Registered: Feb 2015
Posts: 11

Rep: Reputation: Disabled
Compare given password and regexp with password length


Hello friends,

I want to compare regexp and password, Including password length using shell script.

password=az*12345
regexp=^[a-zA-Z]{2}[*][0-9]{5}$

please let me know
thanks in advance.

Last edited by prasad1990; 03-24-2015 at 05:43 AM.
 
Old 03-24-2015, 03:27 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,460

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
Ok, what have you written so far?
 
Old 03-24-2015, 09:50 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,996

Rep: Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187Reputation: 3187
Looks good so far. Where are you stuck? I would recommend some quotes
 
Old 05-02-2015, 10:17 PM   #4
prasad1990
LQ Newbie
 
Registered: Feb 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
I got answer for that guys.. thanks, i will share it with you..
 
  


Reply

Tags
php, shell script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Password length validation Agustina Linux - Software 2 07-17-2012 05:09 PM
Minimum password length Domskis Linux - Newbie 4 10-20-2011 02:32 AM
Compare LDAP password with php crypt password coolamit78 Linux - Networking 1 01-30-2006 05:35 AM
Password length ust Linux - Distributions 1 04-06-2005 05:18 AM
Password length in SuSE 8.0 odin123 Linux - Security 3 05-24-2002 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration