Hi,
I am using the command in python from a linux system:
import os
os.system('grep "^[0-9]" data.txt | wc -l')
The output of this is an integer like 115. Can I assign this to a variable somehow? For example:
x=os.system('grep "^[0-9]" data.txt | wc -l')
DOES NOT WORK.
Please help.
Thank you.