LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags

Reply
 
Thread Tools
Old 12-21-2006, 12:21 AM   #1
edenCC
Member
 
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 167
Blog Entries: 1
Thanked: 1
how to add an empty line in hundreds of files


[Log in to get rid of this advertisement]
HI,list;
how can i add a new empty line in the end of hundreds of files?
I've tried this, but it seems not work..
find . -type f -name *.h -exec echo >>{} \;

Last edited by edenCC; 12-21-2006 at 12:22 AM..
edenCC is offline  
Tag This Post
Reply With Quote
Old 12-21-2006, 12:38 AM   #2
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 11
Thanked: 0
what language?

i only know bash

for file in `ls`; do echo -e "\n" >> $file; done

this adds a blank line to the end of all files in your current directory
carl0ski is offline     Reply With Quote
Old 12-21-2006, 01:06 AM   #3
edenCC
Member
 
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 167
Blog Entries: 1
Thanked: 1

Original Poster
Quote:
Originally Posted by carl0ski
what language?

i only know bash

for file in `ls`; do echo -e "\n" >> $file; done

this adds a blank line to the end of all files in your current directory
finally,I also use this way
but I want to know how to do this only use find.
edenCC is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl to create an empty line if fields are equal ryedunn Programming 2 08-16-2006 04:14 PM
Hundreds of hidden files in home directory doobers Linux - Newbie 3 02-14-2005 03:57 PM
Pine or Mail - empty mailbox by command line jtp51 Linux - Software 3 01-26-2005 02:49 PM
Empty terminal [command line] with no text after kernel upgrade to 2.6.7 whencat Red Hat 7 07-09-2004 04:59 PM
Add lines of code to files from command line robeb Linux - General 2 06-12-2002 04:54 AM


All times are GMT -5. The time now is 04:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration