On 09/29/2011 12:40 PM, David C. Rankin wrote: <snip>
What I do with the script is just output "Tape: # -- " and then come back and just confirm the log and add mm/dd/yyyy - mm/dd/yyyy the old way (with the keyboard :)
What I was going to do is take the dvtmp.log containing (e.g.):
"dcrv-2003.07.27_18-26-46.dv fr-MiB tc-timecode d-date t-2003.07.27 18:28:12 <snip> "dcrv-2003.09.12_16-30-27.dv fr-MiB tc-timecode d-date t-2011.09.28 15:58:48
and grab the date from the filename part of the string (can't use the date at end of line..) That's in the todo pile, but for now, fingers work :)
Thank you David and Anton for your help.
Here is what I came up with to get the dates: ## parse dates OLDIFS=$IFS IFS=$'\n' clipct=1 for i in $(grep \"d dvtmp.log); do dt=${i//\"dcrv-} dt=${dt//_*} [[ $clipct -eq 1 ]] && first_dt=$dt ((clipct++)) done last_dt=$dt IFS=$OLDIFS echo -e "\n first_dt: $first_dt\n last_dt: $last_dt\n" dnh, all see any holes in it or a way to make it better? I was just going to throw it an a function and write it out... -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org