[print_present_path] Now needs only TRACKID to print current path
This commit is contained in:
parent
23359c835c
commit
bff31996f2
1 changed files with 4 additions and 5 deletions
|
@ -3,17 +3,16 @@
|
||||||
# doc print_present_path {
|
# doc print_present_path {
|
||||||
#
|
#
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
# Prints path of exiting TRACKID for IMAGEID.
|
# Prints path of exiting TRACKID.
|
||||||
#
|
#
|
||||||
# USAGE
|
# USAGE
|
||||||
# print_present_path </path/to/db/file> <imageid> <trackid>
|
# print_present_path </path/to/db/file> <trackid>
|
||||||
#
|
#
|
||||||
# }
|
# }
|
||||||
|
|
||||||
print_present_path() {
|
print_present_path() {
|
||||||
local DB_FILE="${1}"
|
local DB_FILE="${1}"
|
||||||
local IMAGEID="${2}"
|
local TRACKID="${2}"
|
||||||
local TRACKID="${3}"
|
|
||||||
|
|
||||||
awk -v imageid=${IMAGEID} -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($2==imageid && $3==trackid){print $4}}' ${DB_FILE}
|
awk -v trackid=${TRACKID} 'BEGIN{FS="\t"}{if($3==trackid){print $4}}' ${DB_FILE}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue