I have a problem trying to write the output of a shell command to a file.
This works
cssbeautify basket.css > file.css
This doesn't. basket.css has now no content
cssbeautify basket.css > basket.css
Is that a normal behavior? How to get around it?
Edit: Here is the command I'm using to beautify all the files in the folder. You might find it useful.
for f in *;
do cssbeautify $f > temp_file && mv temp_file $f;
done