I have some text files. I would like to add a blank line before the first line in each text file. How can I do this with awk?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would prefer
GNU sedfor this task:To add a space to the beginning of the file:
To perform this on multiple text files with the
.txtextension, and make the changes directly to the files (i.e. overwrite them), try:To add a blank line at the beginning of the file:
To perform this on multiple text files with the
.txtextension, and make the changes directly to the files (i.e. overwrite them), try: