Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#!/bin/bash #description :selectable list with high lighting #usage : used 'w' and 's' to move up and down # : 'e' to select and 'q' to quit #author :Kris Occhipinti https://filmsbykris.com #date : Jan 8th 2018 #license :GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt let x=0; list=("BOB" "TIM" "TED" "BILL" "FRANK" "KELLY"); length=${#list[@]} while [ 1 ] do clear for (( i=0; i<$length;i++ )); do if [ $i = $x ] then echo -e "\e[7m${list[$i]}\e[0m" else echo "${list[$i]}" fi done read -rsn1 k case $k in "s") let x++;; "w") let x--;; "q") echo "Goodbye...";exit 0;; "e") echo "${list[$x]} was selected.";sleep 1;echo "GoodBye...";exit 0;; esac if [ $x -lt 0 ] then let x=0; elif [ $x -ge $length ] then let x=$length-1; fi done
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)