This is what I’m trying to do:
$variable = `grep -i "Text: Added to directory" '$FOO/result.txt' | awk '{print $6}' | tr -d "'"`
print $variable;
Output:
Text: Added to directory /path/to/directory/
Use of uninitialized value $6 in concatenation (.) or string
How can I fetch just “/path/to/directory” instead of “Text: Added to directory /path/to/directory/”?
Of course Perl can do what grep, awk and tr can do.