Skip to content

Instantly share code, notes, and snippets.

View nero's full-sized avatar

nero

View GitHub Profile
#!/bin/sh
# Download youtube-dl from github
dirname="youtube-dl"
git clone --depth=1 https://github.com/github/dmca "$dirname"
cd "$dirname"
git fetch origin pull/8142/head
git branch youtube-dl 416da574e
git checkout youtube-dl
sfpath = io.open("/proc/meminfo", "r")
sf = sfpath:read("*a")
local number = string.match(sf, "MemTotal:%s*(%d+) kB")
print(tonumber(number))
Bash attempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote shell daemon, usually rshd, or the secure shell daemon sshd. If bash determines it is being run in
this fashion, it reads and executes commands from ~/.bashrc and ~/.bashrc, if these files exist and are readable. It will not do this if invoked as sh. The --norc option may be used to inhibit this behavior, and the --rcfile option may be
used to force another file to be read, but neither rshd nor sshd generally invoke the shell with those options or allow them to be specified.
# ssh $host cat .bashrc
bashrc
echo bashrc
# ssh $host uname -a
bashrc
Linux .... 5.10.0-0.bpo.9-amd64 #1 SMP Debian 5.10.70-1~bpo10+1 (2021-10-10) x86_64 GNU/Linux