Podstrony
- Strona startowa
- User Guide
- Koontz Dean R Moonlight Bay T 1 Zabojca strachu
- Stanislaw Lem Katar
- Kazantzakis Nikos Ostatnie kuszenie Chrystusa (2)
- Judith McNaught DoskonałoÂść
- Kosinski, Jerzy Malowany ptak
- Morrell Dav
- Coelho Paulo Na brzegu rzeki Piedry usiadlam (4)
- May Karol Winnetou tom III
- Bacigalupi Paolo
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- windykator.xlx.pl
[ Pobierz całość w formacie PDF ]
.Next to it, aMotif-type scroll bar is visible on the netscape window.5.6.3 Scroll BarsA scroll bar is a method to allow people to display only part of a document, while the rest is othe screen.For instance, the xterm window is currently displaying the bottom third of the textavailable in Figure 5.4.It's easy to see what part of the available text is current being displayed:the darkened part of the scroll bar is relative to both the position and the amount of displayed text.If the text displayed is all there is, the entire scroll bar is dark.If the middle half of the text isdisplayed, the middle half of the scroll bar is darkened.Avertical scroll bar may be to the left or right of the text and a horizontal one may be above orbelow, depending the application.Athena scroll barsAthena scroll bars operate di erently from scroll bars in other windowing systems.Each of the threebuttons of the mouse operate di erently.To scroll upwards that is, display material above whatis currently visible you can click the rightmost mouse button anywhere in the scroll bar.To scrolldownwards, click the left mouse button anywhere in the scroll bar.5.6.COMMON FEATURES 47You can also jump to a particular location in the displayed material by clicking the middle mousebutton anywhere in the scroll bar.This causes the window to display material starting at that pointin the document.Motif scroll barsA Motif scroll bar acts much more like a Microsoft Windows or Macintosh scroll bar.An example ofone is on the right in Figure 5.4.Notice that in addition to the bar, it has arrows above and belowit.These are used for ne-tuning: clicking either the left or middle buttons on them will scroll asmall amount such as one line; the right button does nothing.The behavior of clicking inside the scroll bar is widely di erent for Motif scroll bars than Athenascroll bars.The right button has no e ect.Clicking the left button above the current position scrollsupward.Similarly, clicking below the current position scrolls downward.Clicking and holding theleft button on the current position allows one to move the bar at will.Releasing the left buttonpositions the window.Clicking the middle button anywhere on the bar will immediately jump to that location, similarto the behavior of the Athena middle button.However, instead of starting to display the data atthe position clicked, that position is taken to be the midpoint of the data to be displayed.48 CHAPTER 5.THE X WINDOW SYSTEMChapter 6Working with UnixA UNIX saleslady, Lenore,Enjoys work, but she likes the beach more.She found a good wayTo combine work and play:She sells C shells by the seashore.Unix is a powerful system for those who know how to harness its power.In this chapter, I'll tryto describe various ways to use Unix's shell, bash, more e cently.6.1 WildcardsIn the previous chapter, you learned about the le maintence commands cp, mv, and rm.Occasionally,you want to deal with more than one le at once|in fact, you might want to deal with many les atonce.For instance, you might want to copy all the les beginning with data into a directory called~ backup.You could do this by either running many cp commands, or you could list every le onone command line.Both of these methods would take a long time, however, and you have a largechance of making an error.A better way of doing that task is to type:home larry report ls -F1993-1 1994-1 data1 data51993-2 data-new data2home larry report mkdir ~ backuphome larry report cp data* ~ backuphome larry report ls -F ~ backupdata-new data1 data2 data5home larry reportAs you can see, the asterix told cp to take all of the les beginning with data and copy them to~ backup.Can you guess what cp d*w ~ backup would have done?4950 CHAPTER 6.WORKING WITH UNIX6.1.1 What Really Happens?Good question.Actually, there are a couple of special characters intercepted by the shell, bash.Thecharacter *", an asterix, says replace this word with all the les that will t this speci cation".So,the command cp data* ~ backup, like the one above, gets changed to cp data-new data1 data2data5 ~ backup before it gets run.To illustrate this, let me introduce a new command, echo.echo is an extremely simple command;it echoes back, or prints out, any parameters.Thus:home larry echo Hello!Hello!home larry echo How are you?How are you?home larry cd reporthome larry report ls -F1993-1 1994-1 data1 data51993-2 data-new data2home larry report echo 199*1993-1 1993-2 1994-1home larry report echo *4*1994-1home larry report echo *2*1993-2 data2home larry reportAs you can see, the shell expands the wildcard and passes all of the les to the program youtell it to run.This raises an interesting question: what happens if there are no les that meet thewildcard speci cation? Try echo rc fr*og and bash passes the wildcard speci cation verbatimto the program.Other shells, like tcsh, will, instead of just passing the wildcard verbatim, will reply No match.Here's the same command run under tcsh:mousehouse echo rc fr*ogecho: No match.mousehouseThe last question you might want to know is what if I wanted to have data* echoed back at me,instead of the list of le names? Well, under both bash and tcsh, just include the string in quotes:home larry report echo "data*"mousehouse echo "data*"data* OR data*home larry reportmousehouse6.1.2 The Question MarkIn addition to the asterix, the shell also interprets a question mark as a special character.A questionmark will match one, and only one character.For instance, ls etc ?? will display all two letterles in the the etc directory.6.2.TIME SAVING WITH BASH 516.2 Time Saving with bash6.2
[ Pobierz całość w formacie PDF ]