I have extracted using ls -lt and tail the last file generated in my webcam directory.
It gives me this result
-rw-rw-rw- 1 TonysiMac staff 505429 Jan 10 10:45 IMG_0006.jpg
How can I now just get the file name extracted i.e. so I am left with just IMG_0006.jpg attached to my variable? I need to pipe this into a move command to replace another file in another location that is going to be uploaded to my web site.
I'll keep looking and I know it's pretty simply but it's been a while since I last did any scripting so it's all a bit hazy.
Now I can move the image. My camera is tethered but takes multiple pictures sequentially and I wanted to find a way to move and rename the latest picture as that was the one I was uploading to my webcam page