Quote:
Originally Posted by vega2k
Hello,
I need some help with a shell script and hope you could help me.
I want the script to take the input(text string) and then print it out but remove the first character every time until only there is 10 characters left in the text string.
Ex.
Text input: just a random input
Printed:
ust a random input
st a random input
t a random input
a random input
a random input
random input
random input
andom input
ndom input
|
its definitely homework to me. however, i will just guide you to a start. To cut strings, look
here under substring extraction, or man cut.
You most certainly need a loop, so see here for how to construct a
loop. You may also need a character count of the whole string as a counter. man wc for that