fork download
  1. i=0
  2. word="hello"
  3.  
  4.  
  5. for ((i=1;i<=${#word};i++)) do
  6. foo="Letter $i"
  7. bar="$word | cut -c$i"
  8. echo $foo $bar
  9. done
Success #stdin #stdout 0.02s 5312KB
stdin
Standard input is empty
stdout
Letter 1 hello | cut -c1
Letter 2 hello | cut -c2
Letter 3 hello | cut -c3
Letter 4 hello | cut -c4
Letter 5 hello | cut -c5