1.Count line in files (search for necessary command)
cat ~/file.txt | wc -l
2.Output of time command:
real or total is the time from start to finish of the programm.
user - amount of CPU time spent in user mode.
system or sys - amount of CPU time spent in kernel mode.
3. There is a file with logs, get list of ding ids that appear in this file and write to .txt file
path = '/Users/mark/Desktop/delete_many_one_05_08_2019.csv'
output = '/Users/mark/Desktop/result'
with open(path, 'r') as f:
data = f.readlines()
with open(output + ".txt" , 'w') as f:
for line in data:
if "ding_id" in line:
result = line.split('""ding_id"":').split(',').strip('""') +'\n'
4. get list mac,ding_id and write into csv file