Display contents of a file in the parent directory
- by Sharjeel Sayed
I have a command which lists Weblogic instances directories on a server.I want to display contents of a file in the parent directory of each directory listed.
An additional feature would be to display the name of the file in addition to displaying the contents
/usr/ucb/ps auwwx | grep weblogic | tr ' ' '\n' | grep security.policy | grep domain | awk -F'=' '{print $2}' | sed -e 's/weblogic.policy//' -e 's/security\///' | sort
The output of the above command looks like this
/opt/<some_directory>/<domain_name>/<app_name>/
/opt/<some_directory>/<domain_name>/<app_name>/
I want to cat a file somefile.cf in the directory