HackerTrans
TopNewTrendsCommentsPastAskShowJobs

databasher

no profile record

comments

databasher
·2 ปีที่แล้ว·discuss
With lines.txt:

  printf '(%s)\n' "one two" "three four five"
  echo "How you doin'?"
Running:

  while read -r line; do
    eval command=($line)
    command+=("arg with spaces" "other arg")
    "${command[@]}"
  done < lines.txt
Yields

  (one two)
  (three four five)
  (arg with spaces)
  (other arg)
  How you doin'? arg with spaces other arg
databasher
·2 ปีที่แล้ว·discuss
Bash handles spaces just fine.

  # store the command in an array
  X=(echo "A B")
  # execute the command
  "${X[@]}"
Yields:

  A B
databasher
·2 ปีที่แล้ว·discuss
Meanwhile, UPS's web site has mostly gone down. Their home page now reads "Sorry! We Can’t Find That Page. Looks like the page you’re trying to find may have been moved or deleted."