I'm trying to get the directory path from the grep result, so that i can remove the directory when the backup fails. 

So how do i get the target-dir (exactly /backups/incr/2015-04-07\_10-00-01/2015-04-08\_09-35-42) from below. 

```
val=`grep -F -m 1 'target-dir=' innobackupex-runner.11498.tmp`
 echo $val
150408 09:35:42 innobackupex: Starting ibbackup with command: xtrabackup --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/backups/incr/2015-04-07_10-00-01/2015-04-08_09-35-42 --innodb_data_file_path="ibdata1:12M:autoextend" --tmpdir=/tmp --tables='.*[.].*' --extra-lsndir='/tmp' --incremental-basedir='/backups/incr/2015-04-07_10-00-01/2015-04-08_09-28-04'

```