case $1 in
video*|audio*|pic*) echo ok;;
*) echo error;;
esac
send_and_move()
{
stat "$@" && echo mv "$@" /tmp
}
export -f send_and_move
find -print0 | xargs -0 --no-run-if-empty bash -c 'send_and_move "$@"'
source .env
echo $HOST
l1 = {"user1": {"Name": None,"Fname": None, "Zarplata": None,"Age": None},"user2": {"Name": None,"Fname": None, "Zarplata": None,"Age": None},"user3": {"Name": None,"Fname": None, "Zarplata": None,"Age": None}}
for login_key, login_value in l1.items():
print(login_key, login_value)
for field, value in login_value.items():
print(field, value)
print(u"Конец")
echo "lint.sh some.css some.js somecss some.csss" | grep -owP "[^\s]+\.css"
some.css
eslint yourfile.js
file=some.js
eslint --stdin --stdin-filename="$file" < "$file"
myeslint() {
eslint --stdin --stdin-filename="$1" < "$1"
}
myeslint some.js
git diff --cached --name-only | xargs eslint
git diff --cached --name-only | xargs -I{} bash -c "cat {} | eslint --stdin --stdin-filename={}"
grep -rlZ xxx . | xargs -0 sed -i.bak /xxx/d
grep -rlZ xxx . | xargs -0 -P4 -l8 sed -i.bak /xxx/d
$ time seq 500000 | xargs touch
real 0m9.208s
# echo 3> /proc/sys/vm/drop_caches
$ time ls -U | wc -l
500000
real 0m0.393s
$ time ls | wc -l
500000
real 0m3.149s