- Joined
- Aug 26, 2013
- Messages
- 148 (0.04/day)
- Location
- NL
System Name | Helios |
---|---|
Processor | AMD Ryzen 5 2600 @ 4.0 |
Motherboard | MSI X470 Gaming Pro Carbon |
Cooling | Corsair iCUE H150i RGB Pro XT |
Memory | 16GB Corsair Vengeance Pro RGB DDR4-3200 |
Video Card(s) | Gigabyte Geforce GTX 1080 G1 Gaming |
Storage | 256GB Hynix Pc401 & 3TB of HDD storage |
Display(s) | AOC CU34G2X + 2x Iiyama E2483HS |
Case | In-Win 303 |
Audio Device(s) | Teufel Concept C 200 USB & Schiit Fulla 2 w/ Beyerdynamic DT 990 Pro 250Ohm |
Power Supply | Corsair RM1000 |
Mouse | Logitech G502 Proteus Spectrum |
Keyboard | Logitech G512 |
Software | Windows 10 |
So i'm making my MOTD, all fancy with ASCII art and colors and such. Now in one section, i want to print a quote that's randomly picked from a file and then printed in on every MOTD print. I'm already using a dynamic MOTD to show server info and uptime. Now the problem is i'm using "sed -n '$RANDOMp' /etc/motd-msg" to pick a random line and print it, but my file doesn't have well into 30K lines of quotes so more often than not it comes up blank. Is there any way to tie the output of $RANDOM to the number of lines in /etc/motd-msg?