how split a string in bash?
Use # and % modifiers to ${}. I’ll do my example on colon instead of space: $ x=a:b:c $ echo ${x%:*} a:b $ echo ${x#*:} b:c
Read the rest of this entry »Use # and % modifiers to ${}. I’ll do my example on colon instead of space: $ x=a:b:c $ echo ${x%:*} a:b $ echo ${x#*:} b:c
Read the rest of this entry »When variables are used they are referred to with the $ symbol in front of them. There are several useful variables available in the shell program. Here are a few: $$ = The PID number of the process executing the shell. $? = Exit status variable. $0 = The name of the command you used [...]
Read the rest of this entry »