LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-26-2009, 07:18 AM   #16
yanchina12
LQ Newbie
 
Registered: Dec 2007
Posts: 13

Original Poster
Rep: Reputation: 0

Dear schneidz ,

Both the code you added with your recent post works but it prints all the folders name so it includes the folders which has a .cm file. .cm files is simple text file .

Your help is much appreciated!

Regards,
Yan
 
Old 02-26-2009, 10:16 AM   #17
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
i am stuck at work rite now with a win-xp machine so i am unable to test it but this is what i think it does:
Code:
for dir in u* # create a list of all dirs that begin with u
do
 if [ ! -f $dir/*.cm ] # if u*/*.cm does not exist
 then
  echo $dir # print out u*
 fi
done # go to next u*
 
  


Reply


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
Change file permissions of files in folders dotancohen Linux - Newbie 1 05-19-2007 03:56 AM
Folders, and Mounts and File associations in KDE wombat53 Slackware 9 10-02-2005 11:18 PM
Desktop File Folders don't work Keithj Linux - Software 1 06-14-2005 01:25 PM
File moving on mounted folders from Java zeshanzia Programming 0 03-11-2005 02:00 AM
Changing file permissions within multiple folders cloudxiii Linux - Newbie 1 02-21-2005 01:20 AM


All times are GMT -5. The time now is 04:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration