Skip to content

Instantly share code, notes, and snippets.

@sschwartzman
Created November 17, 2020 17:46
Show Gist options
  • Save sschwartzman/3c38009262a17979c0a6d824dcf45e69 to your computer and use it in GitHub Desktop.
Save sschwartzman/3c38009262a17979c0a6d824dcf45e69 to your computer and use it in GitHub Desktop.
Numberizer - Turns words into numeronyms
#!/bin/bash
wordinput=$1
wordnumber=$(expr ${#wordinput} - 2)
echo "${wordinput:0:1}${wordnumber}${wordinput: -1}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment