I'm using a program to capture image files and using AppleScript to write .jpgs from the raw camera files. This is executed when a button is clicked in our program.
im receiving weight data from a scale in the following format:
the following section of our script is trimming that down:
set thePath to "Macintosh HD:Users:Shared:CS:" if thePath is equal to thePath then -- Format the weight value to remove extra spaces and decimals set cleanWeightValue to do shell script "echo " & weightValue & " | sed 's/[^0-9.]//g'" -- Update Exif metadata with cleanWeightValue do shell script "/usr/local/bin/exiftool '-Description=je " & cleanWeightValue & " lbs' " & quoted form of POSIX path of thePath & "front.JPG" do shell script "/usr/local/bin/exiftool '-Caption-Abstract=je " & cleanWeightValue & " lbs' " & quoted form of POSIX path of thePath & "front.JPG" do shell script "/usr/local/bin/exiftool '-ImageDescription=je " & cleanWeightValue & " lbs' " & quoted form of POSIX path of thePath & "front.JPG" end if following this our weight reads in the following format in each image's metadata:
our goal is to also trim out those last two decimal points. wondering if this is possible building off our existing sed command

