LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-22-2018, 07:29 AM   #16
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,780

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198

As I said, sed is not that clever. It always opens the input file(s) at the beginning.
NB: in -i mode the sed code runs file by file; $ means end of the current file. This is different from the default streaming mode. So {} + does work!
 
1 members found this post helpful.
Old 10-22-2018, 08:08 AM   #17
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 900

Rep: Reputation: 290Reputation: 290Reputation: 290
Quote:
Originally Posted by MadeInGermany View Post
NB: in -i mode the sed code runs file by file; $ means end of the current file. This is different from the default streaming mode. So {} + does work!
Indeed, well observed!
I'm taking back what I said, thanks.

Quote:
Originally Posted by MadeInGermany View Post
As I said, sed is not that clever. It always opens the input file(s) at the beginning.
Okay, no optimization then...
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash script to read through text files and find largest number in files pomico Programming 15 09-13-2012 01:07 PM
[SOLVED] Pulling text from a text file and append to CSV fishy Linux - Newbie 5 03-02-2012 07:32 AM
[C++] append to each row of a text files sylvaticus Programming 2 10-18-2007 07:22 AM
batch append string to the end of a determined line in text files osio Programming 6 06-30-2005 09:28 AM
linux 'find' to find text files subu_s Programming 2 12-02-2004 02:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:50 AM.

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
Open Source Consulting | Domain Registration