Module 11: Search and Sort Tools - E-Courses
Module 11: Search and Sort Tools - E-Courses
Module 11: Search and Sort Tools - E-Courses
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Operating Systems Prof. P. C. P. Bhat<br />
Indian Institute of Science Bangalore<br />
Operating Systems/<strong>Search</strong> <strong>and</strong> <strong>Sort</strong> <strong>Tools</strong> Worked out Examples<br />
Worked out Examples<br />
<strong>11</strong>.1 What is wild-cards used for in the file related operations?<br />
Wild card is the set of characters used for pattern matching in file related<br />
operations. When we use these characters in conjugation with the comm<strong>and</strong>s<br />
used for file, they save a lot of work. For example if we want to list the files<br />
which start with chap <strong>and</strong> ends with three more characters. like chapter<br />
chap001 chap002 chap003.<br />
So inspite of typing the above pattern we can do ….<br />
ls chapter chap001 chap002 chap003<br />
we can write the comm<strong>and</strong>s which is equally efficient <strong>and</strong> much sorter to type.<br />
ls chap???<br />
This ? is used as wild cards.<br />
Some others are…..<br />
* any number of characters including none<br />
[ijk] a single character either I,j,k<br />
[a-z] a character in the range of a to z<br />
[!a-z] a character other than a to z<br />
P.C.P.Bhat/IISc Bangalore M<strong>11</strong>/V1/June 04/1