Minor performance improvements (#975)
* Skip head and grep and do it all in sed * Replace echo and awk with a parameter expansion
This commit is contained in:
@@ -53,5 +53,5 @@ case "$ext" in
|
||||
scad) openscad -o "$base".stl "$file" ;;
|
||||
sent) setsid -f sent "$file" 2>/dev/null ;;
|
||||
tex) textype "$file" ;;
|
||||
*) head -n1 "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
|
||||
*) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user