Re: [OCLUG-Tech] Shell scripting: how to loop through characters of a string?

2017-07-28 Thread Peter Sjöberg
On 28/07/17 07:15 AM, rpj...@crashcourse.ca wrote: > > Curious about the best(?) way to do some simple operations in a shell > script > that I would *prefer* to be POSIX-compliant, so here's the first > question -- > how to loop through the individual characters of a string? > > I just stumbl

[OCLUG-Tech] Shell scripting: how to loop through characters of a string?

2017-07-28 Thread rpjday
Curious about the best(?) way to do some simple operations in a shell script that I would *prefer* to be POSIX-compliant, so here's the first question -- how to loop through the individual characters of a string? I just stumbled across this solution I'd never heard of: $ echo "rday" | gre