We have huge hadoop cluster and we installed one coordinator preso node and 850 presto workers nodes. now we want to change the values in the file – config.properties but this should be done on all the workers! so under the file is like this and we want to change it to but this was done only on the firs…
find matching text and replace next line in yml
I’m trying to find a line in a yml configuration file and replace the next line with a specific value. I tried sed, but it seems it is not replacing or not able to find the pattern. Below is the snippit of that yml file I want to change port value to 14081 for applicationConnectors as there is another p…
issue in logging in as sudo user
here is the script sample.expect : expecting to log into the host as sudo user. but getting issue [sudo] password for USER: invalid command name “sudo” while executing “sudo” invoked from within “expect “[sudo] password for USER:”” (file “sample.expectR…
How to fix wmctrl Cannot open display when Python open subprocess
This is my program, and it works very well. Output: But if I want to run this program at startup as root in Linux Mint I have problems. I want to run this py file at startup as root but I don’t know how to do it. The main question is how to do it. This is my attempt to
Locating ODBC Driver 13.0 for SQL Server on Ubuntu Azure VM
I have a python script that requires ODBC Driver 13.1 for SQL Server to connect and write to a SQL Server. I am trying to setup the script on a Linux VM running Ubuntu 16.04 on Azure. I am having trouble locating the location of the driver to use in my script. I have followed the instructions here on installi…
Running bash script on multiple shells
So I was trying to create a script on bash shell, I came to know that the script doesn’t run on ksh or dash shells. So my question is how you make a script to run on all 3 (bash, dash & ksh) shells. Answer In order to write a script that is guaranteed to be portable between the various
RPM SPEC Systemd enable and start
I have created a RPM SPEC file but I am struggeling with Systemd enabling and starting. Updating the package through yum disables and stops the service. The distribution is Centos 7.x I have installed the service under /etc/systemd/system. This is what I have tried so for but it does not work. I have not foun…
Unable to exit while loop after reading information written to pipe
TLDR: You have to close the write end of all pipes in all children. The read will detect EOF only if no process has the write end still open. Credits to @Bodo As part of an assignment for an operating systems course, I’m trying to read lines from a file which is in the format of x operand y and
How to Handle the Windows Authentication in Linux Machine?
1.I launch my Application 2. It will ask for my Azure email ID for Authentioncation, Once its provided . 3. Then it will ask for Windows “username” and “password” for Authentication 4.In Linux how to Handle this windows Authentication ??? Help me out on how to handle this .I tried the …
Avoiding kinit when cache still has credentials
I have a systemd service that calls a webservice to perform some maintenance periodically (every minute). The service looks like: now this destroy and reinitializes my kerberos ticket every time. the kinit can take up to 2-3 min. I would like to avoid that step and only kinit if needed. any ideas? Answer Afte…