LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2022, 08:39 PM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,433

Rep: Reputation: 110Reputation: 110
Exact same 'find' command works then doesn't


I want to get the md5 hash of all files in a directory:

Code:
$ find ./ -type f -exec md5sum {} \; > ./md5.txt
Note: my shell is Fish.

That works on a Debian 10 machine. I just tested. It works.

But it doesn't work on a Debian 9 machine.

There are 14 files in the directory. Here is the output:

Code:
$ find ./ -type f -exec md5sum {} \; > ./md5.txt
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
md5sum: '': No such file or directory
What is going on?
 
Old 04-10-2022, 01:58 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by lucmove View Post
What is going on?
Probably has something to do with this:
Quote:
Originally Posted by lucmove View Post
Note: my shell is Fish.
Different versions of fish between debian 9 and 10 treat {} differently? Who knows. Try escaping the \{.
 
1 members found this post helpful.
Old 04-10-2022, 02:32 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
google is your friend, look for: "linux fish find"
https://stackoverflow.com/questions/...e-find-in-fish
 
1 members found this post helpful.
Old 04-10-2022, 07:43 PM   #4
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,433

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by pan64 View Post
google is your friend, look for: "linux fish find"
https://stackoverflow.com/questions/...e-find-in-fish
Well, that's embarrassing. I've been using Fish for some 10 years and I didn't realize curly brackets had special meaning. I grep'ped my old scripts and found that I use them very rarily, almost invariably in regex. I see I need to brush up on my fishing skills.

Thank you.
 
Old 04-10-2022, 07:46 PM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Yeah, most of us don't go fishing, we just bash things around.
 
  


Reply



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
suddenly vlc audio chunky. got sound then no sound then got sound then no sound.. andrewysk Linux - Newbie 4 04-21-2021 08:19 PM
[SOLVED] IPv6 works, then stops working, then works again after restarting networking service woowoo Linux - Server 2 05-11-2015 11:53 PM
Vim-written script show error, and exact same one doesn't. umbrella22 Linux - Newbie 3 02-24-2012 12:38 PM
script to exact audio from avi then move all mp3 ... air4time Linux - Newbie 4 10-20-2010 07:39 PM
VNC Works then stops! Reboot fixes but then it stops again! Leethal Linux - Software 1 02-26-2004 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:01 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
Open Source Consulting | Domain Registration