Skip to content
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

Why fuzzy-match * doesn't work? #1341

Closed
coolbq opened this issue Jul 20, 2023 · 9 comments
Closed

Why fuzzy-match * doesn't work? #1341

coolbq opened this issue Jul 20, 2023 · 9 comments

Comments

@coolbq
Copy link

coolbq commented Jul 20, 2023

os: Windows 10
command: mlr --csv --mfrom *.csv -- cat
error: mlr: open *.csv: The filename, directory name, or volume label syntax is incorrect..

why "*.csv" doesn't match multiple csv files on Windows 10 ?

@johnkerl
Copy link
Owner

Hi @coolbq ! Can you show the output of dir *.csv in a command window?

@aborruso
Copy link
Contributor

I have the same in windows 11. If I run

mlr.exe --csv --mfrom *.csv -- cat

I have mlr: open *.csv: The filename, directory name, or volume label syntax is incorrect...

image

@johnkerl
Copy link
Owner

OK I will look -- thank you! -- my Windows machine is not with me at present but I'll check in a few days.

@johnkerl johnkerl self-assigned this Jul 20, 2023
@johnkerl johnkerl added the bug label Jul 20, 2023
@coolbq
Copy link
Author

coolbq commented Jul 22, 2023

Hi @coolbq ! Can you show the output of dir *.csv in a command window?

image

@johnkerl
Copy link
Owner

@coolbq and @aborruso my apologies, I know what this is, and I have known for many, many years -- even before Miller.

The issue -- a standard issue -- is that Unix and Unix-like shells (including Linux and Mac) expand wildcards like *.csv before handing off to a program, whereas in Windows, programs have to expand themselves.

I've known this for a very long time -- 20 years easily -- and also, the Windows version of Miller goes back many years as well (although of course not 20). I'm embarrassed to say I didn't think of this earlier -- it should have been a fundamental part of any Windows port for the very start, and not only did I not implement wildcard-expansion for Miller on Windows, I didn't write any test cases, etc.

C:\miller\docs\src> mlr --csv cat circle.csv
color,shape,flag,k,index,quantity,rate
red,circle,true,3,16,13.8103,2.9010
yellow,circle,true,8,73,63.9785,4.2370
yellow,circle,true,9,87,63.5058,8.3350
C:\miller\docs\src> mlr --csv cat circle.csv commas.csv
color,shape,flag,k,index,quantity,rate
red,circle,true,3,16,13.8103,2.9010
yellow,circle,true,8,73,63.9785,4.2370
yellow,circle,true,9,87,63.5058,8.3350

Name,Role
"Xiao, Lin",administrator
"Khavari, Darius",tester
C:\miller\docs\src> mlr --csv cat *.csv
mlr: open *.csv: The filename, directory name, or volume label syntax is incorrect..

@johnkerl
Copy link
Owner

@coolbq @aborruso fix on #1362

@aborruso
Copy link
Contributor

@coolbq @aborruso fix on #1362

It works, thank you very much

@coolbq
Copy link
Author

coolbq commented Sep 8, 2023

@coolbq @aborruso fix on #1362

Yes, it works now. Thanks alot !

@coolbq
Copy link
Author

coolbq commented Nov 15, 2023

hhm, it seems there is still a further problem for this fuzzy match combination operation. The combination process just stucks there and never end. If stop the command line windows forcefully, you will get a huge result file.

miller version: 6.9.0
running command:
mlr --csv --mfrom *.txt -- cat > Comb1.txt

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants