Skip to content

How to run jar files sequentially from a shell script

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

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 …

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…