Ubuntu – How to launch sh script with crontab?
I have sh script that works perfectly if you launch it by yourself. But when I try to put it to the crontab nothing happens. My cron schedule expressions is 21 20 * * * bash a.sh And this sh…
I have sh script that works perfectly if you launch it by yourself. But when I try to put it to the crontab nothing happens. My cron schedule expressions is 21 20 * * * bash a.sh And this sh…
Please enter a username: student Now enter your membership: root Membership is valid! ubuntu@user:~$ ./membership.sh Please enter a username: doesnotexist Now enter your membership: alsodoesnotexist Both are not found - why are you even asking me this? ubuntu@user:~$ ./membership.sh Please…
I'm trying to create a Docker image using a Dockerfile and a bash script, but I keep getting this error: (base) mmedina@LAPTOP-OBHFL78T:~/Docker$ docker build -t py4fi:basic . [+] Building 0.5s (8/8) FINISHED => [internal] load build definition from Dockerfile 0.0s…
I use a Linux (Ubuntu) bash. When I ping an address dirrectly - all work fine. But when I use it with a variable that gets it's value from calculation - it fails. what am i doing wrong? network=`ip r…
So I am trying to customize the PS1 value to add a check mark or x to the prompt depending on the result of the previous command. Surprisingly I got that part to work fine. However, it has broken the…
I have a bunch of files in directories with a file that includes important data like author and title. /data/unorganised_texts/a-long-story Many files in the directories, but most importantly each directory includes Data.yaml with contents like this: Category: Name: Space Author:…
I have a data in the following format. >ab:xy_a0by98-2 Movie= top gun actor= Tom Genere=Action Length=234 Credits=30 pe=1 summry=(Tom|action|234) Top Gun is a 1986 American action drama film directed by Tony Scott, and produced by Don Simpson and Jerry Bruckheimer…
I'm creating a simple bash script that launches an instance with User Data, creates an images, and then launches multiple instances using that image. The output keeps hanging just after creating the first Instance, waiting for user input to proceed.…
I am trying to read text file which contain numbers line by line in test.txt 10.5 0.52 78.5 29.8 45 13 21.45 0.02 0.99 1.00 I want to read the number one by one and compare it with 30. I…
I have an array of AWS Cloudformation stacks names in stackList. Now this contains all the stacks in my AWS account, I want to delete them, but in a particular order. Lets say the stackList contains the following string array:…