unix - Read Contents of file inside xar file using the command line -


i trying read contents of file inside xar file without extracting them using command line.

when run command,

xar -tf filename.xar | grep -i 'info' 

it list file after.

but when try read contents of file using,

cat `xar -tf filename.xar | grep -i 'info'` 

i error message saying cat: filename: no such file or directory

you on right track problem using cat try , read file hasn't been extracted archive. need extract archive first before can read contents. use code extracts file reads 'info' file:

xar -xf filename.xar; cat `xar -tf filename.xar | grep -i 'info'` 

hope helps :d (u add code @ end delete added extracted files)


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -