LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux 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



Reply
 
Search this Thread
Old 12-21-2006, 12:21 AM   #1
edenCC
Member
 
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 196
Blog Entries: 1

Rep: Reputation: 32
how to add an empty line in hundreds of files


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.
 
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: 12

Rep: Reputation: 30
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
 
Old 12-21-2006, 01:06 AM   #3
edenCC
Member
 
Registered: May 2006
Location: Gz,China
Distribution: RH,FB
Posts: 196
Blog Entries: 1

Original Poster
Rep: Reputation: 32
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.
 
  


Reply

Tags
find


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
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:03 PM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration