Reputation: 248
When building gcc-4.8.1, I met a cp command as following:
#!/bin/sh
set -x
fname="cp.sh"
cp -v $fname.{,.bk}
It will occurs error when execute this script:
<29>pli[1050]@~/workspace/shell*0 > sh cp.sh
+ fname=cp.sh
+ cp -v cp.sh{,.bk}
cp: missing destination file operand after âcp.sh{,.bk}â
Try 'cp --help' for more information.
<30>pli[1051]@~/workspace/shell*0 >
But when type it on cmd line directly, it works well as expected. It is very in comprehensive to me.\n
<28>pli[1049]@~/workspace/shell*0 > cp -v cp.sh{,.bk}
cp.sh -> cp.sh.bk
<29>pli[1050]@~/workspace/shell*0 > ^C
Upvotes: 0
Views: 423
Reputation: 201537
You need to build gcc
with "bash". On Ubuntu derived distributions "/bin/sh" in not linked to "/bin/bash" (but to "/bin/dash"); this is documented in the Ubuntu wiki here. I would suggest using a "ppa" if possible.
Upvotes: 1