I have generated multiple statements via for loop those statements has to be executed and store each result in a variable using shell script
for example :
ls
ls -l /abc
ls -l /def
Output : 1 is success and 0 is failure
Command1:0
Command2:1
Command3:0