Code: Select all
#!/bin/bash
# Shows enabled sockets, mounted devices, and wifi router(?) information
(echo "Sockets:
"
sudo systemctl -l|grep .socket
echo "
______________________________
"
echo "Mounted:
"
sudo fdisk -l
echo "
______________________________
"
echo
echo "Enter name of your internet device: "
read userInt
echo "Wifi:
"
sudo ifconfig ${userInt}) | more
exit
Or should I hold my horses with the questions til I actually finish the series.
Also its a bit time consuming trying find resources for bash programming (is it called programming? or scripting?) and what the "if, fi" version of bash scripting is called instead of the shell commands. If I search youtube for "bash scripting tutorials" its 99% about the commands and not the language.
So my question is should I just switch to learning python since there are so many more resources, although what made bash so fun for me was the immediate changes and info I could see in real life on my sensually beautiful Mint 19 Cinnamon (I love you baby, and thank you to anyone involved in its development again linux really gives me hope in the future of technology and this distro makes it look like classy). And Id usually keep trying to find out what exactly i'm supposed to do with all the syntax i'm learning from the other languages I tried but bored me to sleep (python, javascript which i gotta kinda further on cause i needed website functionality, C sharp for computer science class which I dropped after the first day). Bash seems further off than the other languages I tried learned so its a little off-putting, reminds me when I was a kid and picked up a book on visual basic.
Or, or do my python scripts run just as easily on the terminal? Or even after writing them? No compiling? If yes is the answer the latter string of questions i'll be binging python this weekend
Edited: Added the lines between outputs
Edit2: User types in their internet device (im not good with terminology; device sounded right)
Edit3: Think I found the right series folks, waiting for if statements so I can do other things if the user doesnt know their internet device. Maybe possible to figure it out for them by checking packets and returning that device. Or maybe just give them a list of all possible connections. This is seriously fun