How to get filename without extension from %f in bash terminal? -
the below programme (when-changed) gives filename %f can used in command. how can filename without file extension %f ?
this command want use:
when-changed *.scss -c sassc %f f%-min.css it saves filename like: layout.scss-min.css need layout-min.css, if possible.
create little shell script calls sassc you, instead of calling directly:
#!/bin/bash filename=$1 outfile="${filename%.*}" # filename replacement here sassc "$filename" "$outfile" then call:
when-changed *.scss -c ./myscript.sh %f bash filenames
No comments:
Post a Comment