I have file js.txt which contains paths to javascript files. I want to output all javascripts into one file.
js.txt content:
js/jquery/jquery-1.6.2.min.js
js/jquery/jquery-ui-1.8.6.custom.min.js
My bash script:
#!/bin/bash
WEBROOT=/home/rexxar/web/webroot/
FILE=$WEBROOT"js.txt"
cat "js.txt" | while read LINE; do
cat $WEBROOT$LINE >> js_all.js
done
Output in terminal is error message: "Directory or file doesn't exist" followed by file path fragment for each line.
: Directory or file doesn't exist/jquery/jquery-1.6.2.min.js
: Directory or file doesn't exist/jquery/jquery-ui-1.8.6.custom.min.js
I am sure that all paths are right and files does exist.
js/jquery/*.js, the error message says it's not finding/jquery/*.js(notice the absence ofjs/). Please recheck and make sure you post both the exact script and error messages.