LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-12-2012, 07:23 AM   #1
talksanjiv
LQ Newbie
 
Registered: Dec 2011
Posts: 4

Rep: Reputation: Disabled
command in linux, similar to ckstr in solaris


Hi ALL

I am new to linux.
I just got stuck in one of my ksh script. Do we have any command/utility in linux which is similar to ckstr in solaris.

ckstr would prompt the user for input and test it against some regular expression. (http://docs.oracle.com/cd/E19082-01/...6g5/index.html)

Any help would be highly appreciated.

Thanks
 
Old 01-12-2012, 10:00 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
It shouldn't be too difficult to create, in bash it would be something like:

Code:
read -p "[*] please enter something: " ANSWER
if [[ "$ANSWER" =~ <some_regex> ]]
then
  #do something
...
 
Old 01-21-2012, 03:30 AM   #3
talksanjiv
LQ Newbie
 
Registered: Dec 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
I could resolve the issue.
Thanks a lot for help.
 
  


Reply



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
Is there something similar to a udev rule in solaris express dev. ed. crisostomo_enrico Solaris / OpenSolaris 2 08-17-2007 07:18 AM
Is there a RedHat Network Install tool similar to Solaris JumpStart? davee Red Hat 2 06-01-2007 01:40 AM
Trying to Delete Nexenta OS, similar to Solaris femi1 Linux - Newbie 1 12-21-2006 10:18 PM
commands similar to Solaris's prtdiag solarisman Linux - Newbie 2 08-20-2005 01:09 AM
Exsists in Linux a command similar to ipconfig? zWaR Linux - Newbie 1 03-05-2004 05:27 PM

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

All times are GMT -5. The time now is 04:21 PM.

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