Skip to content
Advertisement

Tag: command

Find files and print only their parent directories

I have the following commands. Wherever the .user.log file is present, we need to print the parent directories (i.e hht and wee1.) How can this be done? Answer Am I missing something here. Surely all this regex and/or looping is not necessary, a one-liner will do the job. Also “for foo in $()” solutions will fail when there are spaces

Advertisement