fgrep hanging??

Hi

I’ve had this code running for quite a while now, until recently it started to hang at the fgrep script and eventually timeout.

It must have started after I upgraded to macOS Catalina.

The file Daily.CSV is a spreadsheet on a samba share on a Raspberry Pi. I can access this file from my Mac.

The ‘search’ variable is set to a date. I have put in a specific date for this example.
The script gets the line that contains that date.

Running the fgrep command from the Mac terminal works.

Can’t see what is holding it up.

tell application "AppleScript Utility"
	set DailyCSV to "/Volumes/config/readings/Daily.csv"
	set search to "2019 Oct 12"
	do shell script "fgrep  '" & search & "' " & DailyCSV
end tell

Hi, Pierre. Shell scripts shouldn’t reside within tell blocks. I would quote the search term, as it contains spaces.

do shell script "fgrep " & "2019 Oct 12"'s quoted form & space & "/Volumes/config/readings/Daily.csv"

HI

Thank you for that. Problem solved.

How come it was working before?

AppleScript used to silently error and then redirect the command. I haven’t checked, but perhaps the redirection no longer occurs.

Hi

Tried it again this morning and it’s not working.

Strange