The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
read string, check string length and cut ozzy80 Shell Programming and Scripting 9 03-21-2007 05:56 PM
replacing a string in a file with command line parameter chiru_h Shell Programming and Scripting 5 08-03-2006 10:34 AM
Passing a string parameter to a function fastgoon Shell Programming and Scripting 1 07-17-2006 03:37 PM
Help with making a parameter check script. GCTEII Shell Programming and Scripting 2 03-07-2006 03:30 AM
How to check parameter variable? negixx Shell Programming and Scripting 4 06-10-2005 06:37 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-14-2005
bcunney bcunney is offline
Registered User
  
 

Join Date: Feb 2005
Location: ireland
Posts: 1
Question Check if parameter passes in contains certain string

Hi Guys,
I am writing a Unix script which accepts a directory path as parameter $1

so something like

/user5.data/WA/01

will be passed in.

I want to determine if the directory path passed in contains "WA" as above (because then I need to do something specific if it does)

What is the best way to check this?

I am still fairly new to Unix scripting


Cheers

B Cunney
 

Bookmarks

Tags
regex, regular expressions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0