How can I delete the first (!) line of a text file if it\'s empty, using e.g. sed or other standard UNIX tools. I tried this command:
sed \'/^$/d\' < somefile
Delete the first line of all files under the actual directory if the first line is empty : find -type f | xargs sed -i -e '2,$b' -e '/^$/d'
find -type f | xargs sed -i -e '2,$b' -e '/^$/d'