Sponsored Content
Top Forums Shell Programming and Scripting What is "fortune" for UNIX ???? Post 302278837 by otheus on Wednesday 21st of January 2009 09:35:59 AM
Old 01-21-2009
The wiki page included a link to an FTP site with various versions of Fortune included therein.

You can usually pipe the output of "fortune" like you would any other UNIX process.
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Commands on Digital Unix equivalent to for "top" and "sar" on other Unix flavour

Hi, We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0. Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ? I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc. ... (1 Reply)
Discussion started by: sameerdes
1 Replies

2. Shell Programming and Scripting

Filtering/Finding a "Fortune" message

Hi, I have had a problem in Linux with the "Fortune" messages (unfortunately! :( ) and I need to trap the message again. It starts with a "IMPORTANT NOTICE". To capture this, I write a script as follows.. #!/bin/sh a=0 while ; do /usr/games/fortune >> fortune.txt a=`expr $a + 1` done... (4 Replies)
Discussion started by: oldtrash
4 Replies

3. Shell Programming and Scripting

Unix commands delete all files starting with "X" except "X" itself. HELP!!!!?

im a new student in programming and im stuck on this question so please please HELP ME. thanks. the question is this: enter a command to delete all files that have filenames starting with labtest, except labtest itself (delete all files startign with 'labtest' followed by one or more... (2 Replies)
Discussion started by: soccerball
2 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

6. Homework & Coursework Questions

Need help creating shell script with output that has 2014 calendar and 2 text items from a"fortune"

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am required to create a bash shell script with either emacs or vi. It must include the year 2014 calendar on... (9 Replies)
Discussion started by: dandanhelpmeman
9 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
FORTUNE(6)							 BSD Games Manual							FORTUNE(6)

NAME
fortune -- print a random, hopefully interesting, adage SYNOPSIS
fortune [-aefilosw] [-m pattern] [[N%] file/dir/all] DESCRIPTION
When fortune is run with no arguments it prints out a random epigram. Epigrams are divided into several categories, where each category is subdivided into those which are potentially offensive and those which are not. The options are as follows: -a Choose from all lists of maxims, both offensive and not. (See the -o option for more information on offensive fortunes.) -e Consider all fortune files to be of equal size (see discussion below on multiple files). -f Print out the list of files which would be searched, but don't print a fortune. -i Ignore case for -m patterns. -l Long dictums only. -m pattern Print out all fortunes which match the regular expression pattern. See regex(3) for a description of patterns. -o Choose only from potentially offensive aphorisms. Please, please, please request a potentially offensive fortune if and only if you believe, deep down in your heart, that you are willing to be offended. (And that if you are, you'll just quit using -o rather than give us grief about it, okay?) ... let us keep in mind the basic governing philosophy of The Brotherhood, as handsomely summarized in these words: we believe in healthy, hearty laughter -- at the expense of the whole human race, if needs be. Needs be. --H. Allen Smith, "Rude Jokes" -s Short apothegms only. -w Wait before termination for an amount of time calculated from the number of characters in the message. This is useful if it is exe- cuted as part of the logout procedure to guarantee that the message can be read before the screen is cleared. The user may specify alternative sayings. You can specify a specific file, a directory which contains one or more files, or the special word all, which says to use all the standard databases. Any of these may be preceded by a percentage, which is a number N between 0 and 100 inclusive, followed by a '%' character. If it is, there will be an N percent probability that an adage will be picked from that file or directory. If the percentages do not sum to 100, and there are specifications without percentages, the remaining percent will apply to those files and/or directories, in which case the probability of selecting from one of them will be based on their relative sizes. As an example, given two databases funny and not-funny, with funny twice as big, saying $ fortune funny not-funny will get you fortunes out of funny two-thirds of the time. The command $ fortune 90% funny 10% not-funny will pick out 90% of its fortunes from funny (the ``10%'' is unnecessary, since 10% is all that's left). The -e option says to consider all files equal; thus $ fortune -e is equivalent to $ fortune 50% funny 50% not-funny Datafiles for fortune are created by the strfile(8) utility, which is not installed by default, The source code for this utility can be found in /usr/src/games/fortune/strfile, if it exists. FILES
/usr/share/games/fortune/* Fortune files. SEE ALSO
regex(3), random(6), rot13(6) BSD
September 9, 2004 BSD
All times are GMT -4. The time now is 06:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy