Just a memo here:
${var_name:start_index:num_of_chars_after_index}
prompt:$ to_be_sliced="1234567890"
prompt:$ sliced=${to_be_sliced:5:${#to_be_sliced}}
prompt:$ echo $sliced
67890
Note:
${#var_name} returns the length of $var_name
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento