diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2012-11-04 02:52:03 +0000 |
commit | 23090366f729c56cab62de74c7a51792357e98a9 (patch) | |
tree | c511c885796e28ec571b5267e8f11f3b103d35e9 /games/fortune | |
parent | 7750ad47a9a7dbc83f87158464170c8640723293 (diff) | |
parent | 22ff74b2f44234d31540b1f7fd6c91489c37cad3 (diff) | |
download | src-23090366f729c56cab62de74c7a51792357e98a9.tar.gz src-23090366f729c56cab62de74c7a51792357e98a9.zip |
Sync from head
Notes
Notes:
svn path=/projects/bmake/; revision=242545
Diffstat (limited to 'games/fortune')
-rw-r--r-- | games/fortune/datfiles/fortunes | 9 | ||||
-rw-r--r-- | games/fortune/datfiles/freebsd-tips | 15 | ||||
-rw-r--r-- | games/fortune/tools/do_uniq.py | 12 |
3 files changed, 25 insertions, 11 deletions
diff --git a/games/fortune/datfiles/fortunes b/games/fortune/datfiles/fortunes index 5fc8374c5e71..cd476ed7a4b0 100644 --- a/games/fortune/datfiles/fortunes +++ b/games/fortune/datfiles/fortunes @@ -22100,6 +22100,11 @@ planet. Tuna, chicken, sparrow-brains, etc., these are all things of our world that they like, but catnip is crack from home. -- Bill Cole % +I am only one, but I am one. I cannot do everything, but I can do +something. And I will not let what I cannot do interfere with what +I can do. + -- Edward Everett Hale, (1822 - 1909) +% I am professionally trained in computer science, which is to say (in all seriousness) that I am extremely poorly educated. -- Joseph Weizenbaum, "Computer Power and Human Reason" @@ -31413,6 +31418,10 @@ Look ere ye leap. % Look out! Behind you! % +Look up and not down, look forward and not back, look out and not in, +and lend a hand. + -- Edward Everett Hale, "Lowell Institute Lectures" (1869) +% Look, we play the Star Spangled Banner before every game. You want us to pay income taxes, too? -- Bill Veeck, Chicago White Sox diff --git a/games/fortune/datfiles/freebsd-tips b/games/fortune/datfiles/freebsd-tips index a56d815fe454..f2a0bd2ccf68 100644 --- a/games/fortune/datfiles/freebsd-tips +++ b/games/fortune/datfiles/freebsd-tips @@ -40,7 +40,7 @@ Having trouble using fetch through a firewall? Try setting the environment variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See +reinstall it with boot0cfg(8). See "man boot0cfg" for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon @@ -272,8 +272,11 @@ will search '/', and all subdirectories, for files with 'GENERIC' in the name. % To see all of the directories on your FreeBSD system, type - ls -R / | less - -- Dru <genesis@istar.ca> + find / -type d | less + +All the files? + + find / -type f | less % To see how long it takes a command to run, type the word "time" before the command name. @@ -315,9 +318,9 @@ and they can be combined as "ls -FG". Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make search name=<port-name>" + make search name=<port-name> or - "make search key=<keyword>" + make search key=<keyword> % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -422,6 +425,8 @@ You can press Ctrl-D to quickly exit from a shell, or logout from a login shell. -- Konstantinos Konstantinidis <kkonstan@duth.gr> % +You can press Ctrl-L while in the shell to clear the screen. +% You can press up-arrow or down-arrow to walk through a list of previous commands in tcsh. % diff --git a/games/fortune/tools/do_uniq.py b/games/fortune/tools/do_uniq.py index bea9644d9dca..6fde74967e10 100644 --- a/games/fortune/tools/do_uniq.py +++ b/games/fortune/tools/do_uniq.py @@ -34,26 +34,26 @@ def edit(datfile): for line in file(datfile): if line == "%\n": key = hash(fortune) - if not dups.has_key(key): + if key not in dups: dups[key] = [] dups[key].append(fortune) fortunes.append(fortune) fortune = "" else: fortune += line - for key in dups.keys(): + for key in list(dups.keys()): if len(dups[key]) == 1: del dups[key] o = file(datfile + '~', "w") for fortune in fortunes: key = hash(fortune) if key in dups: - print '\n' * 50 + print('\n' * 50) for f in dups[key]: if f != fortune: - print f, '%' - print fortune, '%' - if raw_input("Remove last fortune? ") == 'y': + print(f, '%') + print(fortune, '%') + if input("Remove last fortune? ") == 'y': del dups[key] continue o.write(fortune + "%\n") |