Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-12-2008, 04:08 AM   #1
LQ Newbie
Registered: Feb 2008
Posts: 11

Rep: Reputation: 0
script to list the filenames which are in lower case


I just want to check the file names in the directory are lower case or upper case and i want to print the filenames which are upper case.

Can u please help me out
Old 03-12-2008, 04:13 AM   #2
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
do you mean anything that has uppercase or has all uppercase?

here's a method using grep.. i know you can also do this in sed or do file globbing that uses regular expression in bash.

has uppercase: 'ls | grep "[A-Z]"'
has all uppercase (no lowercase method): 'ls | grep -v "[a-z]"'
has all uppercase (everything should be except periods of course): 'ls | grep "^[A-Z]\+\.\{0,1\}[A-Z]*$"'

Last edited by konsolebox; 03-12-2008 at 04:21 AM.
Old 03-12-2008, 07:09 AM   #3
LQ Newbie
Registered: Feb 2008
Posts: 11

Original Poster
Rep: Reputation: 0
i have to check the filenames of .sql extension are with lower case letters,if any upper case filenames are there i need to print those file names


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
shell script for converting filenames to proper case? Yalla-One Programming 9 02-03-2010 02:37 AM
renaming directories from upper case to lower case, help!! linux_teller Linux - Newbie 3 03-07-2008 05:15 AM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 04:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 04:15 AM
Apache and upper or lower case. dsiguy Linux - General 3 02-04-2003 11:02 AM

All times are GMT -5. The time now is 03:19 PM.

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