Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Canon camera mounted with gphotofs and I'm trying to essentially do an md5sum on all of the files, but I need to rename the files before I write them to my file, so sed is in the equation. However, if I pipe output to tee, echo, cat, or even just try to redirect with >, I get no output at all. Weird.

Here's what I'm running:

md5sum * | sed -e 's:\bJPG\b:jpg:' -e 's:\bMOV\b:mov:' -e 's:\bCR2\b:cr2:' | tee ~/Desktop/remote.md5sum

If I remove the final redirect to tee, it works. If not, it doesn't. Any ideas as to what could be going wrong?

share|improve this question
I would begin by checking tee with type tee, and file /path/to/tee, path returned by type. – enzotib Aug 23 '11 at 6:19
Do you mean that the command ending with > ~/Desktop/remote.md5sum works? – rozcietrzewiacz Aug 23 '11 at 19:24
Nope, it doesn't work. No output redirection after sed works. – TK Kocheran Aug 24 '11 at 16:41
(Please use the @ if you are answering to a comment, I came back here by chance). OK, and how about the almost same thing - but with >> ~/Desktop/remote.md5sum? Does the file ~/Desktop/remote.md5sum already exist? – rozcietrzewiacz Aug 24 '11 at 17:58
@TKKocheran Just curious about what happened with this question? Was the issue resolved? – jw013 Jan 6 '12 at 2:42
show 2 more comments

closed as too localized by Kevin, Michael Mrozek Feb 15 '12 at 21:31

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.