
On 8/10/19 12:47 am, Andrew McGlashan via luv-main wrote:
On 8/10/19 12:08 am, Andrew Greig via luv-main wrote:
On 7/10/19 8:37 pm, Andrew McGlashan via luv-main wrote:
for x in 6H9*;do mv -v "${x}" "${x/H/J}";done
Hi Andrew, That is a very elegant one liner. So this one just changed the H to a J
Let's see if some light is entering the brain at this late hour So this - for x in 6H9* - is saying for the input 6H9* (all files in the directory with 6H9as a prefix) then do the exchange of the J for the H using the move command mv which is another way to rename; -v for verbose will print the outcome on screen and after that it looks like the swap but I am lost from this point. But grateful.
So, in plain bash for your data files, it could be as simple as follows:
for x in *H*;do mv -vi "${x}" "${x/H/J};done
and to reverse the changes:
for x in *J*;do mv -vi "${x}" "${x/J/H};done A.
Thanks Andrew, I will be paying more attention in future to the impending 9999, and I will, if I remember, stop the session, quickly change the user option to do 6K9Axxxx and drop in a new SD card. Tonight, after doing that the camera set the counters to 6J9A0001, so I just fired off 85 black frames and formatted the card, so now the numbering system is coherent. BUT if I am asleep at the wheel, or so busy that I sale past 9999 then I will use your one liner to bail myself out, again, Thanks Andrew