Skip to content

Instantly share code, notes, and snippets.

@thegreyd
Created December 18, 2017 15:33
Show Gist options
  • Save thegreyd/f5db7bc4282888610ac67ca6076fcd66 to your computer and use it in GitHub Desktop.
Save thegreyd/f5db7bc4282888610ac67ca6076fcd66 to your computer and use it in GitHub Desktop.
Local File Sharing with Python Server
#!/bin/sh
#bash script to share files with a url from a folder
#steps
#copy file to the share folder, start python server
#check ip address and form the url and share it
cd ~/Public
ifconfig wlp3s0 | grep "inet " | awk '{print "Sharing at "$2":8000"}'
echo "Press Ctrl-C to stop"
python3 -m http.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment