unix

Yes Yes Yes Yes!

I've been doing this unix lark for a pretty long time now but I'm never afraid to learn something new. Today's lesson.. the 'yes' command.

Part of the gnu coreutils, it echos a 'y' into your script (you can alter the string to a different character or a word too). So you want to install 500 packages and it's asking you to say yes to them all? Try something like this:
yes | pkgadd -d /cdrom/Solaris_10/Product `cat pkg_list`

new version of cal

One of the most useful commands I use on Unix is the cal command. It outputs a simple text based calendar along the lines of:

garan@fastlap:~$ cal
     March 2007
Su Mo Tu We Th Fr Sa
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
garan@fastlap:~$

and will take command line arguments like this:

garan@fastlap:~$ cal 01 1973
    January 1973
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
garan@fastlap:~$

How can such a simple command get any better? Now today's date is highlighted using an inverse block which means I don't have to type date before typing cal.

Syndicate content