25.03.2013 Views

Copyright Sams Teach Yourself Shell Programming in 24 Hours

Copyright Sams Teach Yourself Shell Programming in 24 Hours

Copyright Sams Teach Yourself Shell Programming in 24 Hours

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

In the previous example, the command that you used specified the options to ls separately. These options<br />

can also be grouped together. For example, the commands<br />

$ ls -aF<br />

$ ls -Fa<br />

are the same as the command<br />

$ ls -a -F<br />

As you can see, the order of the options does not matter to ls. As an example of option group<strong>in</strong>g, consider<br />

the equivalent follow<strong>in</strong>g commands:<br />

ls -1 -a -F<br />

ls -1aF<br />

ls -a1F<br />

ls -Fa1<br />

Any comb<strong>in</strong>ation of the options -1, -a, and -F produces identical output:<br />

./<br />

../<br />

.emacs<br />

.exrc<br />

.kshrc<br />

.profile<br />

.rhosts<br />

b<strong>in</strong>/<br />

ch07<br />

ch07.bak<br />

docs/<br />

hosts<br />

hw1<br />

hw2<br />

hw3<br />

lib/<br />

pub/<br />

res.01<br />

res.02<br />

res.03<br />

test_results<br />

users<br />

work/<br />

<strong>Sams</strong> <strong>Teach</strong> <strong>Yourself</strong> <strong>Shell</strong> <strong>Programm<strong>in</strong>g</strong> <strong>in</strong> <strong>24</strong> <strong>Hours</strong> Contents Index<br />

Hour 3: Work<strong>in</strong>g with Files<br />

Sections <strong>in</strong> this Chapter:<br />

Previous Chapter Next Chapter<br />

List<strong>in</strong>g Files Summary<br />

View<strong>in</strong>g the Content of a File Questions<br />

Manipulat<strong>in</strong>g Files Terms<br />

Previous Section Next Section

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!