Can I take an argument input, lets say it's, hg0000_xy1_v2, in the script it becomes f ... then hack off the end of the filename to change the variable to hg0000 only.
I tried using sed but can't figure it out.
f="$f" | sed 's/_fg[0-9]_v[0-9]//'
I could change the variable label if necessary to anything other than f if that's easier. I just need to be able to work with only the first 6 characters of the filename.
Any ideas?
Thanks