Hi, I figured out this on my own before, but I lost my notes



I am downloading weekly ocean tidal graphs for a specific tidal station from a dependable online source, with the goal of cropping, resizing to scale each image (due to the scale of the graph varying from 18 feet to 10 feet in size over the same sizedimage, applying artful filters for less -graph-ey chopy graph line, then splitting each image into 5. I delete days 6 and 7 from the image because in that portion of the image there is a key of the same color as the graph line that sometimes intersects with it and would be nigh impossible to remove from the affected images when I am operating on the whole folder. So not weeks, but groups of 5 days, about 100 of them, representing 70 weeks.
When using convert, *_%d.gif is not working, naming the files *_0,1,2,3,4 and when using mogrify, -crop with -repage and -adjoin is not working, as -adjoin does not seem to be compatible.
mogrify *.gif -crop 5x1@ +repage +adjoin *_%d.gif
OUTCOME mogrify.im6: unrecognized option `+adjoin' @ error/mogrify.c/MogrifyImageCommand/3918.
I found a simple bash script from these same forums, but I do not know how to modify it to retain the original name of each file with an added _0,1,2,3,4 at the end of the file name.
for f in *.gif do convert $f -crop 5x1@ split/$f_%.gif
OUTCOME: bash: syntax error near unexpected token `for'
But I was just Frankensteining commands, I do not know anything really about bash scripts, scripts in general, and enumerated and naming conventions that use *, $, %, other than my previous experience with * and mogrify I think it was... (I sucessfully transformed whole folders of images, I just don't remember if i used convert or mogrify)
The naming outcome desired is like the folllowing: 18_14+4_97 means: 18 feet of tidal graph 14 feet positive, 4 negative holds 13.something and -3.something tidal data graph, 97th group of 5 images, for about week 70.
SO...
How do I split a folder of about 100 images into 5 each, the above image would be split and renamed like 18_14+4_97_0(,1,2,3,4)? Input images are 4500 pixels wide, dividing each image into 5x900 pixel wide images... (516 pixels tall...)
PS if I reorder the imagenames, which would be easy for me to do for this batch of 100, but I will be doing many more batches if I name the images 97_18_14+4, how would I split them and rename them like 97_0(,1,2,3,4)_18_14+4.gif so that all the images would be in order and essentially by the day?