a.tar есть файлы d*и t* и еще какие нибуль тогда чтобы извлечь d*tar tvf a.tar | grep -E ' \bd' | awk '{print $NF}' | xargs -IX tar xvf a.tar X\b есть пробел: ' \bd'd - первая буква тех файлов что хотим извлечьtar tvf a.tar | grep -E '/\bd | ... - то есть вместо пробела поставить разделитель пути
RUN chmod 777 /tmp/upload
echo $DISPLAY:0.0netstat -la | grep CONNECTED| grep Xunix 3 [ ] STREAM CONNECTED 29511 @/tmp/.X11-unix/X0sudo lsof /tmp/.X11-unix/X0lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Xorg 1113 root 6u unix 0xffff8f775d282800 0t0 27173 /tmp/.X11-unix/X0 type=STREAM
jq --arg k1 "first" --arg v1 "32" --arg k2 "second" --arg v2 "32" --arg k3 "third" --arg v3 "33" '. | .[$k1]=$v1 | .[$k2]=$v2 | .[$k3]=$v3' <<<'{}' ;{
"first": "32",
"second": "32",
"third": "33"
}
sed -e "s/,/, ${id},/" users.txtecho a,b,c > users.txt;read -p "ID: " id; sed -e "s/,/, ${id},/" users.txt
ID: 123456
a, 123456,b,c
Makefile для make (так же как build.xml для ant pom.xmlдля maven build.gradle для gradle и т.д.)make -i -k -n | tee /tmp/a.log-i, --ignore-errors
Ignore all errors in commands executed to remake files.
-k, --keep-going
Continue as much as possible after an error.
-n, --just-print, --dry-run, --recon
Print the commands that would be executed, but do not execute them
(except in certain circumstances).
#!/bin/bash
# или !/bin/sh в докере на apline
MSG='port 123'
if [[ "${MSG//[^a-z ]/}" == 'port ' ]]; then
echo "PORT = ${MSG//[^0-9]/}";
fi
MSG='host mysql_db'
if [[ "${MSG// [a-z_]*/}" == 'host' ]]; then
echo "HOST = ${MSG//host /}";
fiPORT = 123
HOST = mysql_db