Reputation: 5664
I want to run multiple commands on command line in linux. Here's the example:
abc.txt: hello
$ test 'cat abc.txt'
Here test is a command which runs agains the value of abc.txt and abc.txt is the file which have some value.
How can i print the value from the file and run the test command ?
Upvotes: 0
Views: 102
Reputation: 113834
This runs cat abc.txt
, placing the contents of that file the command line where they are used as arguments to the command test
:
test "$(cat abc.txt)"
Upvotes: 1