New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell command advice #115
Comments
def mydiff(file1, file2, pattern):
return diff(sed("s/%s//g" % (pattern), file1), sed("s/%s//g" % (pattern), file2)) ? |
This is what I tried at first, but it does not work, the diff comand issues a "No such file or directory" error. |
Because you have to first redirect the output of sed to a file for diff to
|
I was trying to avoid temporary files, but I can live with them as well. |
So I'm trying to redirect sed output to a file and I'm really puzzled, I cannot get it working.
But I get no file. Am I doing it all wrong? |
use (ls > "foo")() don't forget the () operator runs the process. to create redirections, Tomer Filiba On Mon, Mar 31, 2014 at 5:04 PM, Antoine Dechaume
|
Thanks Tomer. |
why, it's in the cheat sheet: http://plumbum.readthedocs.org/en/latest/, under "redirection" Tomer Filiba On Mon, Mar 31, 2014 at 5:15 PM, Antoine Dechaume
|
I know, and now it seems obvious, but the fact is I've been struggling with it, and my feeling is that starting off by a simple example without multiple redirections, pipe or bound argments would help some people. |
Hi Tomer,
what would be a good way to implement this command
where
pattern
,file1
andfile2
would change from one execution to another?The text was updated successfully, but these errors were encountered: