Currently I'm doing this to try and store the actual file and its contents the find
command finds:
find /Users/Documents -name "Myfile" > outputfile
The contents of 'Myfile' is:
This is my original file.
however when I go to perform an operation, such as cat outputfile
it takes the actual output of the find
command,rather than the file itself and displays:
/Users/Documents/Myfile
I am expecting when I do cat outputfile
:
This is my original file.
How can I store the file itself and perform operations on it? My particular use case is to perform static analysis of the file I have recently found using find
. I don't care for displaying the output of the command. I want to find a file based on the keyword, then perform a scan on that original file.