I have this command

```
grep 'Some pattern' location/*filename* | cut -d ' ' -f2 | cut -d '}' -f2 |
grep -v '^$' | head -1

```

The above command is giving me output as some file name, such as:

```
abc.txt

```

Now I want to grep another line from this file abc.txt with matching some specific pattern, so I did this

```
grep 'some pattern' location/*filename* | grep -iv .tar | grep -v backup |
grep -v bkp | cut -d ' ' -f2 | cut -d '}' -f2 | head -1 | xargs grep 'some pattern'

```

It's not working because the `abc.txt` file is not present in my current directory.

Can anybody tell me how to append location path to `abc.txt` before passing it to `xargs grep` command?