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



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-07-2008
jul jul is offline
Registered User
 

Join Date: Feb 2008
Posts: 4
case sensitive "if [ -e $file ]"?

hi,

I need to check if a file exists.

Code:
if [ -e $file ]

is not case sensitive, while I need an exact -case sensitive- match.
Is there any other command to do that?

thx
jul
Sponsored Links
  #2 (permalink)  
Old 05-07-2008
fpmurphy's Avatar
Moderator
 

Join Date: Dec 2003
Location: Florida
Posts: 2,101
What do you mean by "not case sensitive"? UNIX and GNU/Linux file names are case sensitive.
Please provide more information if you want us to help you.
  #3 (permalink)  
Old 05-08-2008
jul jul is offline
Registered User
 

Join Date: Feb 2008
Posts: 4
ok, sorry, I should have tried it first in local.

I want to check if a file exists in a shared folder on a windows computer, mounted as follows:


Code:
sudo mount -t cifs -o username=xxx,password=xxx,uid=jul,gid=jul //192.168.0.92/public /media/shared

and when running the command for a file in /media/shared, the search is not case sensitive (i.e. MyFile is found even if it's called myfile).

Is there any way (mount option, other command...) to make it case sensitive?

thanks for your reply!

Jul
Sponsored Links
Closed Thread

Bookmarks

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"sed" to check file size & echo " " to destination file jockey007 Shell Programming and Scripting 7 04-28-2009 03:08 AM
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" Linux Bot UNIX and Linux RSS News 0 01-04-2008 03:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
copy "cp" command how distinquish upper/lower case bobk544 UNIX for Dummies Questions & Answers 1 09-17-2007 12:46 PM
my "case" doesn't work ! Nicol Shell Programming and Scripting 5 09-30-2004 11:28 AM



All times are GMT -4. The time now is 04:23 AM.


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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0