Skip to content

Instantly share code, notes, and snippets.

@balook
Last active March 30, 2020 03:49
Show Gist options
  • Save balook/f86b40cc8a945b6ff44628a283768d66 to your computer and use it in GitHub Desktop.
Save balook/f86b40cc8a945b6ff44628a283768d66 to your computer and use it in GitHub Desktop.
executing commands

code

#! /usr/bin/env python3

import sys 
import os

# print(os.system('ls'))


for line in sys.stdin.readlines():
	data = line.strip()
	# print(data)
	print(os.system('echo '+str(data)))




    # print(line,end='')
	
@balook
Copy link
Author

balook commented Mar 9, 2020

#! /usr/bin/env python3

import sys
import os

print(os.system('ls'))

for line in sys.stdin.readlines():
data = line.strip()
# print(data)
print(os.system(f'{data} google.com'))

# print(line,end='')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment