12,153 reputation
14362
bio website about.me/manatwork
location Eastern Europe
age 38
visits member for 3 years, 3 months
seen Dec 22 at 9:10

I enjoy programming in two ways:

  • when working, I use the most adequate tool for each task
  • when relaxing, I use the least adequate tool for each task

Nov
6
awarded  Nice Answer
Sep
30
awarded  Explainer
Sep
26
comment Splitting string by the first occurrence of a delimiter
@distilledchaos, yes, that is also a way. I will keep the first example with cut as that is the question owner had problem with. Regarding your suggestion, note that parameter expansion's arguments are subject to arithmetic evaluation, so the explicit $((…)) is not necessary: string="${s:${#id} + 1}".
Sep
17
awarded  Enlightened
Sep
17
awarded  Nice Answer
Sep
16
awarded  Enlightened
Sep
16
awarded  Nice Answer
Sep
16
awarded  Enlightened
Sep
16
awarded  Nice Answer
Sep
1
awarded  Yearling
Jul
2
awarded  Enlightened
Jul
2
awarded  Nice Answer
Jun
30
awarded  Enlightened
Jun
30
awarded  Nice Answer
Jun
17
awarded  Constituent
Jun
10
awarded  Caucus
May
13
awarded  Enlightened
May
13
awarded  Nice Answer
May
12
comment What's the difference between $@ and $*
Related: What's the difference between $@ and $* in UNIX?, What is the difference between $@ and $* in shell scripts?, What the difference between “$@” and “$*” in bash?.
May
12
reviewed Reviewed Setting up tty ports on Beaglebone Black with Angstrom linux