![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script question | ace2000 | Shell Programming and Scripting | 7 | 04-18-2008 03:39 PM |
| cgi script question | zilla30066 | Shell Programming and Scripting | 1 | 05-03-2007 02:56 PM |
| script question | fusionjd | Shell Programming and Scripting | 1 | 02-05-2006 06:38 PM |
| script question | shad0w75 | UNIX for Dummies Questions & Answers | 2 | 06-19-2003 04:53 PM |
| Script Question | merlin | UNIX for Dummies Questions & Answers | 2 | 11-20-2001 10:57 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
First off I usually script in the bash shell. Ok, in my script I am checking to see if the filename has a .txt extension. So I was trying: Code:
if [ ! -e "*txt" ]
then
echo "Must contain a valid .txt extension"
fi
Code:
if [ "-f" -eq *[txt] ]
then
echo "Must contain a valid .txt extension"
fi
added code tags for readability --oombera Last edited by oombera; 02-19-2004 at 02:58 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|