Bash Post
Notebook showing bash commands
• 9 min read
!export project_dir = ~/Desktop/Work/CSA/fastpages-CSA
/usr/bin/sh: 1: export: : bad variable name
!ls
2020-02-20-test.ipynb 2022-08-23-primitives.ipynb ghtop_images 2022-08-17-java.ipynb 2022-08-25-bash.ipynb my_icons 2022-08-17-python.ipynb README.md
!echo "Change directory into project and print working directory"
!cd $project
!pwd
!echo "List all files in fastpages repo"
!cd $project_dir
!ls
!echo "list with more information"
!ls -al
Change directory into project and print working directory /mnt/c/Users/Aadit.JEDILORD/Desktop/Work/CSA/fastpages-CSA/_notebooks List all files in fastpages repo 2020-02-20-test.ipynb 2022-08-23-primitives.ipynb ghtop_images 2022-08-17-java.ipynb 2022-08-25-bash.ipynb my_icons 2022-08-17-python.ipynb README.md list with more information total 3116 drwxrwxrwx 1 aadit aadit 512 Aug 28 00:09 . drwxrwxrwx 1 aadit aadit 512 Aug 25 08:37 .. -rwxrwxrwx 1 aadit aadit 3162468 Aug 17 21:54 2020-02-20-test.ipynb -rwxrwxrwx 1 aadit aadit 1225 Aug 21 21:29 2022-08-17-java.ipynb -rwxrwxrwx 1 aadit aadit 1114 Aug 17 21:54 2022-08-17-python.ipynb -rwxrwxrwx 1 aadit aadit 3242 Aug 25 09:13 2022-08-23-primitives.ipynb -rwxrwxrwx 1 aadit aadit 4763 Aug 28 00:15 2022-08-25-bash.ipynb -rwxrwxrwx 1 aadit aadit 771 Aug 17 21:54 README.md drwxrwxrwx 1 aadit aadit 512 Aug 17 21:54 ghtop_images drwxrwxrwx 1 aadit aadit 512 Aug 17 21:54 my_icons
echo "What package do you want to find"
read package
dpkg -l | grep $package
# This program asks for package and returns the package name with description
conda list
and conda info
can help verify Anaconda installation and list conda packages installed
!conda list
# packages in environment at /home/aadit/anaconda3: # # Name Version Build Channel _anaconda_depends 2019.10 py37_0 _ipyw_jlab_nb_ext_conf 0.1.0 py37_0 _libgcc_mutex 0.1 main _r-mutex 1.0.0 anacondar_1 _tflow_select 2.3.0 mkl absl-py 0.9.0 py37_0 agate 1.6.1 py37_2 agate-dbf 0.2.1 py_0 agate-excel 0.2.3 py_0 agate-sql 0.5.4 py_0 alabaster 0.7.12 py37_0 anaconda custom py37_1 anaconda-client 1.7.2 py37_0 anaconda-navigator 1.9.7 py37_0 anaconda-project 0.8.2 py37_0 appdirs 1.4.4 pyh9f0ad1d_0 conda-forge apscheduler 3.6.3 py37_1 asgiref 3.2.7 py_0 asn1crypto 0.24.0 py37_0 astor 0.7.1 py_0 conda-forge astroid 2.2.5 py37_0 astropy 3.1.2 py37h7b6447c_0 atomicwrites 1.3.0 py37_1 attrs 19.1.0 py37_1 babel 2.6.0 py37_0 backcall 0.1.0 py37_0 backports 1.0 py37_1 backports.os 0.1.1 py37_0 backports.shutil_get_terminal_size 1.0.0 py37_2 bash-kernel 0.7.2 pypi_0 pypi beautifulsoup4 4.9.0 py37_0 binutils_impl_linux-64 2.33.1 he6710b0_7 binutils_linux-64 2.33.1 h9595d00_15 bitarray 0.8.3 py37h14c3975_0 bkcharts 0.2 py37_0 blas 1.0 mkl bleach 3.1.0 py37_0 blosc 1.15.0 hd408876_0 bokeh 1.0.4 py37_0 boto 2.49.0 py37_0 bottleneck 1.2.1 py37h035aef0_1 brotlipy 0.7.0 py37h8f50634_1000 conda-forge bs4 4.9.0 0 bwidget 1.9.11 1 bzip2 1.0.6 h14c3975_5 c-ares 1.15.0 h7b6447c_1001 ca-certificates 2022.07.19 h06a4308_0 cairo 1.16.0 h18b612c_1001 conda-forge certifi 2022.6.15 py37h06a4308_0 cffi 1.12.2 py37h2e261b9_1 cfgv 3.3.0 pyhd8ed1ab_0 conda-forge chardet 3.0.4 py37_1003 click 7.1.2 py_0 cloudpickle 0.8.0 py37_0 clyent 1.2.2 py37_1 colorama 0.4.1 py37_0 conda 4.12.0 py37h06a4308_0 conda-build 3.17.8 py37_0 conda-env 2.6.0 1 conda-package-handling 1.6.1 py37h7b6447c_0 conda-verify 3.1.1 py37_0 configparser 5.0.2 pyhd8ed1ab_0 conda-forge contextlib2 0.5.5 py37_0 cryptography 2.6.1 py37h1ba5d50_0 csvkit 1.0.4 py37_0 curl 7.68.0 hf8cf82a_0 conda-forge cycler 0.10.0 py37_0 cython 0.29.7 py37he6710b0_0 cytoolz 0.9.0.1 py37h14c3975_1 dash 1.0.0 py_0 conda-forge dash-core-components 1.0.0 py_0 conda-forge dash-html-components 1.0.0 py_0 conda-forge dash-renderer 1.0.0 py_0 conda-forge dash-table 4.0.0 py_0 conda-forge dask 1.1.4 py37_1 dask-core 1.1.4 py37_1 dbfread 2.0.7 py37_0 dbus 1.13.6 h746ee38_0 decorator 4.4.0 py37_1 defusedxml 0.5.0 py37_1 distlib 0.3.2 pyhd8ed1ab_0 conda-forge distributed 1.26.0 py37_1 django 3.0.3 py_0 docutils 0.14 py37_0 editdistance 0.5.3 py37h3340039_2 conda-forge entrypoints 0.3 py37_0 et_xmlfile 1.0.1 py37_0 expat 2.2.6 he6710b0_0 fastcache 1.0.2 py37h14c3975_2 ffmpeg 4.1.3 h167e202_0 conda-forge filelock 3.0.10 py37_0 flask 1.1.2 py_0 flask-compress 1.4.0 py_0 flask-login 0.5.0 py_0 anaconda flask-socketio 4.3.0 pypi_0 pypi flask-wtf 0.14.3 pypi_0 pypi fontconfig 2.13.1 he4413a7_1000 conda-forge freetype 2.9.1 h8a8886c_1 fribidi 1.0.5 h7b6447c_0 fsspec 0.7.1 py_0 future 0.17.1 py37_0 gast 0.3.3 py_0 gcc_impl_linux-64 7.3.0 habb00fd_1 gcc_linux-64 7.3.0 h553295d_15 get_terminal_size 1.0.0 haa9412d_0 gettext 0.19.8.1 hc5be6a0_1002 conda-forge gevent 1.4.0 py37h7b6447c_0 gevent-websocket 0.10.1 pypi_0 pypi gfortran_impl_linux-64 7.3.0 hdf63c60_1 gfortran_linux-64 7.3.0 h553295d_15 giflib 5.1.9 h516909a_0 conda-forge glib 2.58.3 py37h6f030ca_1002 conda-forge glob2 0.6 py37_1 gmp 6.1.2 h6c8ec71_1 gmpy2 2.0.8 py37h10f8cd9_2 gnutls 3.6.13 h79a8f9a_0 conda-forge google-pasta 0.2.0 py_0 graphite2 1.3.13 h23475e2_0 greenlet 0.4.15 py37h7b6447c_0 grpcio 1.27.2 py37hf8bcb03_0 anaconda gsl 2.5 h294904e_1 conda-forge gst-plugins-base 1.14.0 hbbd80ab_1 gstreamer 1.14.0 hb453b48_1 gunicorn 20.0.4 py37_0 gxx_impl_linux-64 7.3.0 hdf63c60_1 gxx_linux-64 7.3.0 h553295d_15 h5py 2.10.0 py37h7918eee_0 harfbuzz 2.4.0 h37c48d4_1 conda-forge hdf5 1.10.4 hb1b8bf9_0 heapdict 1.0.0 py37_2 html5lib 1.0.1 py37_0 icu 58.2 h9c2bf20_1 identify 2.1.4 pyhd8ed1ab_0 conda-forge idna 2.9 py_1 imageio 2.5.0 py37_0 imagesize 1.1.0 py37_0 importlib-metadata 0.19 py37_0 conda-forge importlib_metadata 0.8 py37_0 intel-openmp 2019.3 199 ipykernel 5.1.0 py37h39e3cac_0 ipython 7.4.0 py37h39e3cac_0 ipython_genutils 0.2.0 py37_0 ipywidgets 7.4.2 py37_0 isodate 0.6.0 py_1 isort 4.3.16 py37_0 itsdangerous 1.1.0 py37_0 jasper 1.900.1 h07fcdf6_1006 conda-forge jbig 2.1 hdba287a_0 jdcal 1.4 py37_0 jedi 0.13.3 py37_0 jeepney 0.4 py37_0 jinja2 2.11.2 py_0 joblib 0.14.1 py_0 jpeg 9d h516909a_0 conda-forge json5 0.9.4 py_0 jsonschema 3.0.1 py37_0 jupyter 1.0.0 py37h06a4308_8 jupyter_client 5.2.4 py37_0 jupyter_console 6.0.0 py37_0 jupyter_core 4.4.0 py37_0 jupyterlab 0.35.4 py37hf63ae98_0 jupyterlab_server 0.2.0 py37_0 keras 2.3.1 0 keras-applications 1.0.8 py_0 keras-base 2.3.1 py37_0 keras-preprocessing 1.1.0 py_1 keyring 18.0.0 py37_0 kiwisolver 1.2.0 py37hfd86e86_0 krb5 1.16.4 h2fd8d38_0 conda-forge lame 3.100 h14c3975_1001 conda-forge lazy-object-proxy 1.3.1 py37h14c3975_2 ld_impl_linux-64 2.33.1 h53a641e_7 leather 0.3.3 py37_0 libarchive 3.3.3 h5d8350f_5 libblas 3.8.0 15_mkl conda-forge libcblas 3.8.0 15_mkl conda-forge libcurl 7.68.0 hda55be3_0 conda-forge libedit 3.1.20181209 hc058e9b_0 libffi 3.2.1 hd88cf55_4 libgcc-ng 8.2.0 hdf63c60_1 libgfortran-ng 7.3.0 hdf63c60_0 libiconv 1.15 h516909a_1006 conda-forge liblapack 3.8.0 15_mkl conda-forge liblapacke 3.8.0 15_mkl conda-forge liblief 0.9.0 h7725739_2 libpng 1.6.37 hbc83047_0 libprotobuf 3.11.3 hd408876_0 libsodium 1.0.16 h1bed415_0 libssh2 1.9.0 h1ba5d50_1 libstdcxx-ng 8.2.0 hdf63c60_1 libtiff 4.0.10 h2733197_2 libtool 2.4.6 h7b6447c_5 libuuid 2.32.1 h14c3975_1000 conda-forge libwebp 1.0.2 h576950b_1 conda-forge libxcb 1.13 h1bed415_1 libxml2 2.9.9 he19cac6_0 libxslt 1.1.33 h7d1a2b0_0 llvmlite 0.28.0 py37hd408876_0 locket 0.2.0 py37_1 lxml 4.5.0 py37hefd8a0e_0 lz4-c 1.8.1.2 h14c3975_0 lzo 2.10 h49e0be7_2 make 4.2.1 h1bed415_1 markdown 3.1.1 py37_0 anaconda markupsafe 1.1.1 py37h7b6447c_0 matplotlib 3.1.3 py37_0 matplotlib-base 3.1.3 py37hef1b27d_0 mccabe 0.6.1 py37_1 mistune 0.8.4 py37h7b6447c_0 mkl 2020.1 217 mkl-service 2.3.0 py37he904b0f_0 mkl_fft 1.0.10 py37ha843d7b_0 mkl_random 1.0.2 py37hd81dba3_0 mock 4.0.2 py_0 more-itertools 6.0.0 py37_0 mpc 1.1.0 h10f8cd9_1 mpfr 4.0.1 hdf1c602_3 mplcursors 0.3 py_0 conda-forge mpmath 1.1.0 py37_0 msgpack-python 0.6.1 py37hfd86e86_1 multipledispatch 0.6.0 py37_0 navigator-updater 0.2.1 py37_0 nbconvert 5.4.1 py37_3 nbformat 4.4.0 py37_0 ncurses 6.1 he6710b0_1 neovim 0.3.1 py37hc8dfbb8_1 conda-forge nettle 3.4.1 h1bed415_1002 conda-forge networkx 2.2 py37_1 nltk 3.4 py37_1 nodeenv 1.6.0 pyhd8ed1ab_0 conda-forge nodejs 10.13.0 he6710b0_0 nose 1.3.7 py37_2 notebook 5.7.8 py37_0 numba 0.43.1 py37h962f231_0 numexpr 2.6.9 py37h9e4a6bb_0 numpy 1.16.3 py37h7e9f1db_0 numpy-base 1.16.3 py37hde5b4d6_0 numpydoc 0.8.0 py37_0 olefile 0.46 py37_0 opencv 4.1.0 py37h5517eff_4 conda-forge openh264 1.8.0 hdbcaa40_1000 conda-forge openpyxl 2.6.1 py37_1 openssl 1.1.1q h7f8727e_0 packaging 19.0 py37_0 pandas 1.0.3 py37h0573a6f_0 pandas-datareader 0.7.0 py37_0 pandoc 2.2.3.2 0 pandocfilters 1.4.2 py37_1 pango 1.40.14 he7ab937_1005 conda-forge parsedatetime 2.4 py37_0 parso 0.3.4 py37_0 partd 0.3.10 py37_1 patchelf 0.9 he6710b0_3 path.py 11.5.0 py37_0 pathlib2 2.3.3 py37_0 patsy 0.5.1 py37_0 pcre 8.43 he6710b0_0 pep8 1.7.1 py37_0 pexpect 4.6.0 py37_0 pickleshare 0.7.5 py37_0 pillow 6.2.1 py37h34e0f95_0 anaconda pip 19.0.3 py37_0 pixman 0.38.0 h7b6447c_0 pkginfo 1.5.0.1 py37_0 plotly 3.8.1 py_0 pluggy 0.9.0 py37_0 ply 3.11 py37_0 pre-commit 2.13.0 py37h89c1867_0 conda-forge prometheus_client 0.6.0 py37_0 prompt_toolkit 2.0.9 py37_0 protobuf 3.11.3 py37he6710b0_0 psutil 5.6.1 py37h7b6447c_0 ptyprocess 0.6.0 py37_0 py 1.8.0 py37_0 py-lief 0.9.0 py37h7725739_2 pycodestyle 2.5.0 py37_0 pycosat 0.6.3 py37h14c3975_0 pycparser 2.19 py37_0 pycrypto 2.6.1 py37h14c3975_9 pycurl 7.43.0.2 py37h1ba5d50_0 pyflakes 2.1.1 py37_0 pygments 2.3.1 py37_0 pylint 2.3.1 py37_0 pynvim 0.4.1 py37hc8dfbb8_1 conda-forge pyodbc 4.0.26 py37he6710b0_0 pyopenssl 19.0.0 py37_0 pyparsing 2.4.7 py_0 pyqt 5.9.2 py37h05f1152_2 pyrsistent 0.14.11 py37h7b6447c_0 pysocks 1.6.8 py37_0 pytables 3.5.1 py37h71ec239_0 pytest 4.3.1 py37_0 pytest-arraydiff 0.3 py37h39e3cac_0 pytest-astropy 0.5.0 py37_0 pytest-doctestplus 0.3.0 py37_0 pytest-openfiles 0.3.2 py37_0 pytest-remotedata 0.3.1 py37_0 python 3.7.6 h8356626_5_cpython conda-forge python-dateutil 2.8.1 py_0 python-engineio 3.13.0 pypi_0 pypi python-libarchive-c 2.8 py37_6 python-slugify 3.0.4 py_0 python-socketio 4.6.0 pypi_0 pypi python_abi 3.7 1_cp37m conda-forge pytimeparse 1.1.8 py37_0 pytz 2019.3 py_0 pywavelets 1.0.2 py37hdd07704_0 pyyaml 5.1 py37h7b6447c_0 pyzmq 18.0.0 py37he6710b0_0 qt 5.9.7 h5867ecd_1 qtawesome 0.5.7 py37_1 qtconsole 4.4.3 py37_0 qtpy 1.7.0 py37_1 r-alphavantageclient 0.0.1 r36h6115d3f_0 r r-askpass 1.0 r36h14c3975_0 r r-base 3.6.1 h8900bf8_2 conda-forge r-curl 3.3 r36h96ca727_0 r r-httr 1.4.0 r36h6115d3f_0 r r-jsonlite 1.6 r36h96ca727_0 r r-lattice 0.20_38 r36h96ca727_0 r r-mime 0.6 r36h96ca727_0 r r-openssl 1.3 r36h96ca727_0 r r-r6 2.4.0 r36h6115d3f_0 r r-sys 3.2 r36h96ca727_0 r r-xts 0.11_2 r36h96ca727_0 r r-zoo 1.8_6 r36h96ca727_0 r readline 8.0 hf8c457e_0 conda-forge requests 2.23.0 py37_0 retrying 1.3.3 py37_2 ripgrep 11.0.2 he32d670_0 rope 0.12.0 py37_0 ruamel_yaml 0.15.46 py37h14c3975_0 scikit-image 0.14.2 py37he6710b0_0 scikit-learn 0.22.1 py37hd81dba3_0 scipy 1.4.1 py37h0b6359f_0 seaborn 0.9.0 py37_0 secretstorage 3.1.1 py37_0 sed 4.7 h1bed415_1000 conda-forge selenium 3.141.0 py37h7b6447c_0 send2trash 1.5.0 py37_0 setuptools 40.8.0 py37_0 simplegeneric 0.8.1 py37_2 singledispatch 3.4.0.3 py37_0 sip 4.19.8 py37hf484d3e_0 six 1.14.0 py37_0 snappy 1.1.7 hbae5bb6_3 snowballstemmer 1.2.1 py37_0 sortedcollections 1.1.2 py37_0 sortedcontainers 2.1.0 py37_0 soupsieve 2.0 py_0 sphinx 1.8.5 py37_0 sphinxcontrib 1.0 py37_1 sphinxcontrib-applehelp 1.0.2 py_0 sphinxcontrib-devhelp 1.0.2 py_0 sphinxcontrib-htmlhelp 1.0.3 py_0 sphinxcontrib-jsmath 1.0.1 py_0 sphinxcontrib-qthelp 1.0.3 py_0 sphinxcontrib-serializinghtml 1.1.4 py_0 sphinxcontrib-websupport 1.1.0 py37_1 spyder 3.3.3 py37_0 spyder-kernels 0.4.2 py37_0 sqlalchemy 1.3.1 py37h7b6447c_0 sqlite 3.30.1 hcee41ef_0 conda-forge sqlparse 0.3.1 py_0 statsmodels 0.9.0 py37h035aef0_0 sympy 1.3 py37_0 tbb 2020.0 hfd86e86_0 tblib 1.3.2 py37_0 tensorboard 1.14.0 py37hf484d3e_0 tensorflow 1.14.0 mkl_py37h45c423b_0 tensorflow-base 1.14.0 mkl_py37h7ce6ba3_0 tensorflow-estimator 1.14.0 py_0 termcolor 1.1.0 py37_1 terminado 0.8.1 py37_1 testpath 0.4.2 py37_0 text-unidecode 1.3 py_0 tk 8.6.10 hbc83047_0 anaconda tktable 2.10 h14c3975_0 toml 0.10.2 pyhd8ed1ab_0 conda-forge toolz 0.9.0 py37_0 tornado 6.0.2 py37h7b6447c_0 tqdm 4.31.1 py37_1 traitlets 4.3.2 py37_0 tzlocal 2.0.0 py37_0 unicodecsv 0.14.1 py37_0 unidecode 1.1.1 py_0 unixodbc 2.3.7 h14c3975_0 urllib3 1.25.9 py_0 virtualenv 20.4.7 py37h89c1867_0 conda-forge wcwidth 0.1.7 py37_0 webencodings 0.5.1 py37_1 werkzeug 1.0.0 pypi_0 pypi wheel 0.33.1 py37_0 widgetsnbextension 3.4.2 py37_0 wrapt 1.12.1 py37h7b6447c_1 wtforms 2.3.1 pypi_0 pypi wurlitzer 1.0.2 py37_0 x264 1!152.20180806 h14c3975_0 conda-forge xlrd 1.2.0 py37_0 xlsxwriter 1.1.5 py37_0 xlwt 1.3.0 py37_0 xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.9 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.4 h14c3975_4 yaml 0.1.7 had09818_2 zeromq 4.3.1 he6710b0_3 zict 0.1.4 py37_0 zipp 0.3.3 py37_1 zlib 1.2.11 h7b6447c_3 zstd 1.3.7 h0b5b093_0
!conda info
active environment : base active env location : /home/aadit/anaconda3 shell level : 1 user config file : /home/aadit/.condarc populated config files : /home/aadit/.condarc conda version : 4.12.0 conda-build version : 3.17.8 python version : 3.7.6.final.0 virtual packages : __linux=5.10.102.1=0 __glibc=2.31=0 __unix=0=0 __archspec=1=x86_64 base environment : /home/aadit/anaconda3 (writable) conda av data dir : /home/aadit/anaconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/aadit/anaconda3/pkgs /home/aadit/.conda/pkgs envs directories : /home/aadit/anaconda3/envs /home/aadit/.conda/envs platform : linux-64 user-agent : conda/4.12.0 requests/2.23.0 CPython/3.7.6 Linux/5.10.102.1-microsoft-standard-WSL2 ubuntu/20.04.2 glibc/2.31 UID:GID : 1000:1000 netrc file : /home/aadit/.netrc offline mode : False
git status
: shows modified files in a repository
git add .
: adds all modified files into commit
git commit -m "message"
: creates a new commit with the message "message"
git push
: pushes the commit to remote repository, which in this case is Github
git add .
echo "Please give a commit message"
read commit
git commit -m "$commit"
git push
# Automating push procedure