I have a one line command, lets say
grep needle haystack.file
What if i wanted to replace "needle" with the current working directory using the pwd command. Now it might be possible using pipes but I need the needle part to show the working directory and the rest of the command to be the same.
So preferably something like this:
grep (pwd) haystack.file
Which when executed would actually run the following command:
grep /var/www/html/ haystack.file
I've done a bit of searching and have found a lot of examples with pipes but it cant be applied in my scenario as the first part (grep) and second part (haystack.file) is fixed in an application.