Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
gsup awk
#!/bin/bash str="the_for_an_apple_this" echo $str counter=0 while [ $counter -le 10 ] do str=`echo $str | awk '{gsub(/(^|_)(the|for|an)($|_)/,"_")}1'` ((counter++)) echo $str done str=`echo $str | awk '{gsub(/(^)_/,"")}1' | awk '{gsub(/_($)/,"")}1'` echo $str
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
reverse pyramid
lucky numbers
Sample
asdf
Bash: Find count of a character in a line/word
bstpj
180420107522
Sample
hadikhan
FCFS_done
Please log in to post a comment.