> For the complete documentation index, see [llms.txt](https://imarslo.gitbook.io/book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://imarslo.gitbook.io/book/good/bash/havefun.md).

# havefun

* [I'm very busy](#im-very-busy)
* [labyrinth pattern](#labyrinth-pattern)
* [press any key to continue](#press-any-key-to-continue)
* [fortune](#fortune)
* [simulate type mechine (super cool!!)](#simulate-type-mechine-super-cool)
* [set volume by command](#set-volume-by-command)
* [cat and tac](#cat-and-tac)
* [ASCII chart](#ascii-chart)
* [hate someone](#hate-someone)
* [star war](#star-war)

#### I'm very busy

```bash
$ cat /dev/urandom | hexdump -C | grep "ca fe"

# or: https://www.commandlinefu.com/commands/view/6771/pretend-to-be-busy-in-office-to-enjoy-a-cup-of-coffee
$ j=0; while true; do let j=$j+1; for i in $(seq 0 20 100); do echo $i;sleep 1; done | dialog --gauge "Install part $j : `sed $(perl -e "print int rand(99999)")"q;d" /usr/share/dict/words`" 6 40;done

# or: https://www.commandlinefu.com/commands/view/6673/pretend-to-be-busy-in-office-to-enjoy-a-cup-of-coffee
$ for i in `seq 0 100`; do timeout 6 dialog --gauge "Install..." 6 40 "$i"; done

# show quota
$ fortune | pv -qL 10
```

#### [labyrinth pattern](https://www.commandlinefu.com/commands/view/13993/labyrinth-pattern)

```bash
$ while ( true ) ; do if [ $(expr $RANDOM % 2 ) -eq 0 ] ; then echo -ne "\xE2\x95\xB1" ; else echo -ne "\xE2\x95\xB2" ; fi ; done
```

#### press any key to continue

```bash
$ read -sn 1 -p "Press any key to continue..." && echo "\n"
Press any key to continue...\n
```

#### fortune

* [a random "cow" say a random thing](https://www.commandlinefu.com/commands/view/6019/have-a-random-cow-say-a-random-thing)

  ```bash
  $ fortune | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1)
  ```
* [loop show](https://www.commandlinefu.com/commands/view/12613/waste-time-for-about-3-minutes)

  ```bash
  $ for i in {1..20}; do fortune -w ; sleep 3; clear; done
  ```

#### simulate type mechine (super cool!!)

> \[!NOTE|label:references:]
>
> * [Simulate typing](https://www.commandlinefu.com/commands/matching/pv/cHY=/sort-by-votes)
> * [Simulate typing](https://www.commandlinefu.com/commands/view/7899/simulate-typing)

```bash
$ sudo apt-get intall pv
$ echo "Very very very very very long words" | pv -qL $[10+(-2 + RANDOM%5)]
$ echo "You can simulate on-screen typing just like in the movies" | pv -qL 10

# or
$ sudo apt-get install randtype
$ echo "Very very very very very long words" | randtype -m 4

# or
$ echo "hello world !" | while read x; do for(( i=0; i<${#x}; i++ )); do echo -n "${x:$i:1}"; sleep .06; done; done
```

* [Simulate typing but with mistakes](https://www.commandlinefu.com/commands/view/11737/simulate-typing-but-with-mistakes)

  ```bash
  $ echo -e "You are wa jerk\b\b\b\bwonderful person" | pv -qL $[10+(-2 + RANDOM%5)]
  ```
* [Mac osx friendly version of this terminal typing command at 200ms per key](https://www.commandlinefu.com/commands/view/13499/mac-osx-friendly-version-of-this-terminal-typing-command-at-200ms-per-key)

  ```bash
  $ message="I have a nice easy typing pace"; for ((i=0; i<${#message}; i++)); do echo "after 100" | tclsh; printf "${message:$i:1}"; done; echo
  ```
* [continuously print string as if being entered from the keyboard](https://www.commandlinefu.com/commands/view/6777/continuously-print-string-as-if-being-entered-from-the-keyboard)

  ```bash
  $ cycle(){ while :;do((i++)); echo -n "${3:$(($i%${#3})):1}"; sleep .$(($RANDOM%$2+$1)); done; }

  # usage
  $ cycle 1 4 ' All work and no play makes Jack a dull boy.'
  $ cycle 1 3 $(openssl rand 100 | xxd -p)
  ```

#### set volume by command

```bash
$ pacmd set-sink-volume 0 0x10000
Welcome to PulseAudio! Use "help" for usage information.
```

#### cat and tac

```bash
$ cat a_b
1
2
3
$ tac a_b
3
2
1
```

#### ASCII chart

```bash
$ figlet Marslo
 __  __                _
|  \/  | __ _ _ __ ___| | ___
| |\/| |/ _` | '__/ __| |/ _ \
| |  | | (_| | |  \__ \ | (_) |
|_|  |_|\__,_|_|  |___/_|\___/

$ toilet marslo
                             ""#
 mmmmm   mmm    m mm   mmm     #     mmm
 # # #  "   #   #"  " #   "    #    #" "#
 # # #  m"""#   #      """m    #    #   #
 # # #  "mm"#   #     "mmm"    "mm  "#m#"

# with fonts
$ date +"%I:%M %P" | figlet -f /usr/local/share/figlet/future.tlf
┏━┓┏━┓ ┏━┓┏━┓   ┏━┓┏┳┓
┃┃┃╺━┫╹╺━┫  ┃   ┣━┫┃┃┃
┗━┛┗━┛╹┗━┛  ╹   ╹ ╹╹ ╹

$ date +"%I:%M %P" | toilet -f future
┏━┓┏━┓ ┏━┓┏━┓   ┏━┓┏┳┓
┃┃┃╺━┫╹╺━┫  ┃   ┣━┫┃┃┃
┗━┛┗━┛╹┗━┛  ╹   ╹ ╹╹ ╹

# with colors
$ toilet --gay -f term
# or
$ toilet --metal -f term

# have fun
$ fortune | toilet -w $(($(tput cols)-5)) -f pagga
░█▀▀░█░█░█▀▀░█▀▀░█▀▀░█▀▀░▀█▀░░░█░█░█▀█░█░█░░░▀▀█░█░█░█▀▀░▀█▀░░░█▀▀░▀█▀░▀█▀░░░▀█▀░█░█░█▀▀░█▀▄░█▀▀░░░█▀█░█▀█░█▀▄░░░█░█░█▀█
░▀▀█░█░█░█░█░█░█░█▀▀░▀▀█░░█░░░░░█░░█░█░█░█░░░░░█░█░█░▀▀█░░█░░░░▀▀█░░█░░░█░░░░░█░░█▀█░█▀▀░█▀▄░█▀▀░░░█▀█░█░█░█░█░░░█▄█░█▀█
░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░░▀░░░░░▀░░▀▀▀░▀▀▀░░░▀▀░░▀▀▀░▀▀▀░░▀░░░░▀▀▀░▀▀▀░░▀░░░░░▀░░▀░▀░▀▀▀░▀░▀░▀▀▀░░░▀░▀░▀░▀░▀▀░░░░▀░▀░▀░▀
░▀█▀░▀█▀░░░▀█▀░▀█▀░█░░░█░░░░░█░░░▀█▀░█▀▀░█▀▀░░░█▀▀░█▀▀░▀█▀░█▀▀░░░█▀▀░█▀█░█▀▀░▀█▀░█▀▀░█▀▄░░░
░░█░░░█░░░░░█░░░█░░█░░░█░░░░░█░░░░█░░█▀▀░█▀▀░░░█░█░█▀▀░░█░░▀▀█░░░█▀▀░█▀█░▀▀█░░█░░█▀▀░█▀▄░░░
░▀▀▀░░▀░░░░░▀░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░▀░░░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀▀▀░░░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░
```

#### hate someone

```bash
$ :(){ :|: &  };:
```

#### star war

```bash
$ telnet towel.blinkenlights.nl
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://imarslo.gitbook.io/book/good/bash/havefun.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
