I am trying to run two java application one after other in my docker container. In my dockerfile i have specified invoker.sh as the entry point. ENTRYPOINT [“sh”, “/opt/invoker.sh”] Then i use this script to run two jar files. but this does not work. It gives Error: Unable to access ja…
Creation of brace sequence not working in bash
I must create a sequence of numbers using the number of elements that an list has. arr1=(1 2 3 4 5 6) I thought about the following expression in order to do so, but it is now working. echo {0..$(expr ${#arr1[*]} – 1)} {0..5} # output The correct output should be: 0 1 2 3 4 5 Could anyone explain
BPF: `bpf_obj_get_info_by_fd` fails with `Invalid argument`
I try to get the fd of the BPF_MAP_TYPE_XSKMAP in my user-space program. This is the code: But unfortunately, I get an error for calling bpf_obj_get_info_by_fd(cfg->prog_fd, &prog_info, &prog_info_len): Failed to obtain prog_info 1: Invalid argument. I don’t know if this is because the XDP-pr…
Find out missing files between two directories (missing file names, but not extension) in Linux
Say I have dir1/ that has 1.a 2.a 3.a 5.a and dir2/ has 1.b 2.b 3.b 4.b 5.b. I wonder how can I ignore the extension, and find the missing file (4.b in this case). I assume that diff command doesn’t work as I don’t see relevant argument. Answer You can use the basename command to strip the basenam…
Network interface: you don’t have permission to capture on that device (socket: Operation not permitted)
Currently I’m writing a small project that views the local bandwidth. I installed the package and implemented the code that’s available on the pcap4j site just to try it out like so: Once run I get this error: It makes sense that I can sniff any packets since I’m running it as a non-root use…
Copy the newest two files and append the date
I’m looking for a way to copy the newest .gz files I have in Dir A to Dir B, and append the date to that files. Example: Dir A cinema.gz radio.gz cars.txt camera.gz Dir B cinema.gz.20200310 radio.gz.20200310 Using following command I can copy the newest .gz files to dirb cp $(ls -1t /dira *gz | head -2)…
Text input on command line does not match PS1
I set a custom PS1 to expand the current directory. That works well, however, the text input does not match the PS1 length. Instead of the input being at the “>” I set at the end of PS1, it is instead only about 10 characters in from the line start. This only happens when I’m inputting a …
Multiple IP address problem on debian/beagleboneblack
I’m working on a beaglebone black with a debian system and i want change my ip by modifying “/etc/network/interfaces”, this is working but when I switch from DHCP method to static method my address, (atribuate by DHCP), is not “killed” so I end up with two IP addresses. Answer I …
yum in dockerfile – There are no enabled repos
I am having issues with installing python3 with yum in dockerfile. I did look on internet, I did try few things, not working. Its just small thing but not able to figure it out. When I try to build below docker file I do get error . I get error at line – RUN yum install -y oracle-epel-release-el7 The do…
Deleting strings from text file
I have a txt file, like this: I only want to keep: I tried: It works, but can’t get rid of the date. Answer Although you might prefer to get rid of more whitespace with: