Posts

Showing posts from August 26, 2018

bad substitution running $ls … with bash

Image
Clash Royale CLAN TAG #URR8PPP up vote 5 down vote favorite 1 I got the following error: ./assemblyDB.116.las test.sh: line 9: $ sed 's/.las//': bad substitution and this is the script: for filename in $(find . -type f -name "assemblyDB.*.las"); do echo $filename no=$ sed 's/.las//' echo $no done Thank you in advance. bash share | improve this question edited Feb 26 at 1:26 Charles Duffy 734 4 13 asked Feb 25 at 13:58 user977828 340 1 5 16 What are you trying to accomplish with the braces? Also quote your variables. – Jesse_b Feb 25 at 14:04 add a comment  |  up vote 5 down vote favorite 1 I got the following error: ./assemblyDB.116.las test.sh: line 9: $ sed 's/.las//': bad substitution and this is the script: for filename in $(find . -type f -name "assemblyDB.*.las"); do echo $filename no=$ sed 's/.las//' echo $no done Thank you in adva...