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
This might work for you:
sed '1!b;/^$/d' file