I have a bash script that searchs for password for unrar files. I would like to concatenate result and at the end of the script notify result of execution, but I don´t know why final_result var outputs “INIT-END”. Why does not concatenate in search_pass_and_unrar function? Thanks a lot, best regar…
Tag: linux
Irregular result in zombie example
I have problems with understanding the behavior of this code: When running in a Unix shell I get this result: But sometimes its only giving me this result without any shell prompt: I know it can be solved with wait() function in parent process. But I like to know: Why is result irregular? Could someone please…
How to get Linux to only show the last paragraph in a text file using cat?
I have a school assignment, which says the following: Use the cat command, suitably modified, to show only the last paragraph in the textfile I have already checked on https://unix.stackexchange.com/questions/308032/modifying-cat-command-to-number-paragraphs-and-display-last-paragraph-only, but it wasn’…
Azure VM Linux Ubuntu backup agent – Deployment failed
We have two Ubuntu (14.04) Linux server VMs on Azure hosting. Currently trying to setup the backup service within Azure for these machines. I have followed this guide and have the agent up and running. When running “waagent -version” in bash output shows: When then attempting to enable the backup …
UWSGI https configuration for ubuntu
I have django app that is running using the following uwsgi configuration in redhat 7.3: However, when I run it on Ubuntu 16.04.1 LTS, I got the following error: Does the error means that uwsgi fail to bind the port? Is there a special way of using “shared-socket” in ubuntu? I need to have this ru…
How to use mount command in fstab file
After creating /mnt/bucket folder which is to be used as a local mounting-point for Google Bucket: I can successfully mount it to mybucket Google Bucket by simply typing sudo mount followed by with all its endless arguments in Ubuntu terminal, like so: Since I am supplying mount command with the -o key_file=p…
AWS EC2 – what’s the catch with “bill by hour” for server programs?
I can’t understand a very simple thing about amazon EC2 instances: suppose I have a simple C++ web server program listening to a port at all times (and serving small burst requests when they come).. how would on demand pricing work? In theory the application will be running 24/7 since the OS needs to be…
Tar search results in .sh file
I have to tar a list of files, without path, that is a result of a find via sh (for crontab use). In ubuntu’s shell each command works fine but in .sh not. I tried with : And also with But both failed. May someone help? Alternatives ? Additional scenario info: /myfolder/ contains: one1.log one2.log one3…
Yocto/Qt5.6: Unable to build a sample Qt Application
I have a working Nitrogen6x board that runs on Yocto Krogoth-next build with core-image-sato. I have installed Qt Creator 3.5.1 (based on Qt 5.5.1) and I have added my kit for nitrogen6x board as per [Build & Install Qt5 toolchain] document. I have added a sample Qt Quick Application with component set ch…
Can someone please explain how this works?fork(),sleep()
What is happening here? How is sleep() getting executed in the for loop? When is it getting called? Here is the output: Please explain this output. I am not able to understand how it’s working. Step by step analysis would be great. Answer In the first loop, the original (parent) process forks 10 copies …