unix

Docker build image - glob error { Error: EPERM: operation not permitted, scandir

China☆狼群 提交于 2021-02-09 02:48:47
问题 I'm attempting to build a Docker image of a React+TypeScript+NodeJS application built with Webpack 2.0, but I get the following error > frontend@0.0.1 build / > webpack -p --config configs/webpack.config.ts --env.build --env.sourceMap { isDev: false } glob error { Error: EPERM: operation not permitted, scandir '/proc/1/map_files/55836c87b000-55836c897000' errno: -1, code: 'EPERM', syscall: 'scandir', path: '/proc/1/map_files/55836c87b000-55836c897000' } Error: EPERM: operation not permitted,

WC command in linux

喜你入骨 提交于 2021-02-08 15:55:50
问题 The following is the content stored in my file This is my Input So, using wc -c command we can get the number of characters stored in the file. My expected output for above file that edited by using VIM in Ubuntu is 16. But, wc -c command returns 17 . Why is the output like this? There isn't even a carriage return at end of line. So, what is the 17th character? 回答1: of course you had enter. maybe you cant see it. consider these two examples: echo -n "This is my Input" | wc -c 16 because -n is

“let” internal shell command doesn't work in a shell script?

99封情书 提交于 2021-02-08 12:56:34
问题 I did a=1234 let "a=a+1" on command line and it's fine. But when I do the same in a shell script. It prints out an error that "let: not found". Here is the script file. #!/bin/sh a=1234; let "a=a+1"; echo "$a"; Thanks, 回答1: The problem is likely that /bin/sh is not the same as, or does not behave the same as, your normal shell. For example, when bash is invoked as /bin/sh , it provides a subset of its normal features. So, you may need to change your shebang line to use a different shell: #!

How to Ctrl-Z in Perl script

ⅰ亾dé卋堺 提交于 2021-02-08 11:15:24
问题 I am writing a Perl script and I need to execute Unix Ctrl + Z on the script. How can I do it in Perl ? thanks. 回答1: From perl you can send signals to processes with the function kill, which has the same name as the Unix command line tool that does the same thing. The equivalent to Ctrl + Z is running kill -SIGTSTP pid you need to find out what numeric value your TSTP signal has on your system. You would do this by running kill -l TSTP on the command line. Let's say this returns 20 Then in

How to Ctrl-Z in Perl script

微笑、不失礼 提交于 2021-02-08 11:14:07
问题 I am writing a Perl script and I need to execute Unix Ctrl + Z on the script. How can I do it in Perl ? thanks. 回答1: From perl you can send signals to processes with the function kill, which has the same name as the Unix command line tool that does the same thing. The equivalent to Ctrl + Z is running kill -SIGTSTP pid you need to find out what numeric value your TSTP signal has on your system. You would do this by running kill -l TSTP on the command line. Let's say this returns 20 Then in

Iterating through PL/SQL result in SHELL

主宰稳场 提交于 2021-02-08 10:21:06
问题 I want to iterate over PL/SQL rows in SHELL script and for each row I want to execute some code using current row. At this point I got: VALUE='sqlplus -s /nolog <<EOF CONNECT ${CONNECT} select smth from table; / EXIT EOF' for i in "${VALUE[@]}" do ##some code using "i" variable done At this point for 5 rows code executes only once. It appears it doesn't iterate at all. Any ideas how can I fix that? 回答1: You can iterate your resultset as follows: SQL> select car_model from available_models 2

In awk, why are “” and “\n\n” treated the same for the RS parameter?

99封情书 提交于 2021-02-08 09:32:18
问题 Here are the contents of the file: Person Name 123 High Street (222) 466-1234 Another person 487 High Street (523) 643-8754 And these two things give the same result: $ awk 'BEGIN{FS="\n"; RS="\n\n"} {print $1, $3}' file_contents $ awk 'BEGIN{FS="\n"; RS=""} {print $1, $3}' file_contents The result given in both cases is: Person Name (222) 466-1234 Another person (523) 643-8754 RS="\n\n" actually makes sense, but why is RS="" also treated the same way? 回答1: They aren't treated the same. RS=""

Docker container creating directories owned by root, I need them owned by 1000:1000

早过忘川 提交于 2021-02-08 08:28:21
问题 So, I'm trying to get into creating docker images and I managed to get one going. It was qBittorrent, everything went fine until it started downloading files. All of qBits' directories are owned by 1000:1000 but as soon as it starts downloading a file, my docker-host machine says that the file folder is owned by root:root . How can I make sure that everything the container creates is owned by 1000:1000 ? I need it to be owned by that because other Docker containers, such as Radarr, need to

Docker container creating directories owned by root, I need them owned by 1000:1000

﹥>﹥吖頭↗ 提交于 2021-02-08 08:28:17
问题 So, I'm trying to get into creating docker images and I managed to get one going. It was qBittorrent, everything went fine until it started downloading files. All of qBits' directories are owned by 1000:1000 but as soon as it starts downloading a file, my docker-host machine says that the file folder is owned by root:root . How can I make sure that everything the container creates is owned by 1000:1000 ? I need it to be owned by that because other Docker containers, such as Radarr, need to

While loop in bash to read a file skips first 2 characters of THIRD Line

早过忘川 提交于 2021-02-08 08:16:24
问题 #bin/bash INPUT_DIR="$1" INPUT_VIDEO="$2" OUTPUT_PATH="$3" SOURCE="$4" DATE="$5" INPUT="$INPUT_DIR/sorted_result.txt" COUNT=1 initial=00:00:00 while IFS= read -r line; do OUT_DIR=$OUTPUT_PATH/$COUNT mkdir "$OUT_DIR" ffmpeg -nostdin -i $INPUT_VIDEO -vcodec h264 -vf fps=25 -ss $initial -to $line $OUT_DIR/$COUNT.avi ffmpeg -i $OUT_DIR/$COUNT.avi -acodec pcm_s16le -ar 16000 -ac 1 $OUT_DIR/$COUNT.wav python3.6 /home/Video_Audio_Chunks_1.py $OUT_DIR/$COUNT.wav python /home/transcribe.py --decoder