Category "shell"

Exporting JSON to environment variables

If I have a JSON like this, { "hello1": "world1", "testk": "testv" } And I want to export each of these key-value pairs as environment variables, how t

Exporting JSON to environment variables

If I have a JSON like this, { "hello1": "world1", "testk": "testv" } And I want to export each of these key-value pairs as environment variables, how t

Why does printf behave differently when called from a Makefile?

The printf program can be used to print binary data, e.g.: $ printf '%b' '\xff\xff' �� If I put this in a Makefile on its own, it works the same:

AWS Lambda execute shell npm install error

I'm trying to build a web app in AWS lambda and upload it to an S3 bucket. For that, I utilize child process, which is working fine locally. exec('cd /tmp/ &

Bash Scripts (even trivial ones) stuck when invoked on the terminal

I have a server on which we execute multiple bash scripts to automate tasks (like copying files to other servers, kicking off backups, etc). It has been working

Hyper Terminal: zsh: command not found: hyper

I am using hyper terminal. I wrote the following code to change the theme, but it gave the following error. Command to change theme: hyper i verminal zsh: comm

How do I prevent root access to my docker container

I am working on hardening our docker images, which I already have a bit of a weak understanding of. With that being said, the current step I am on is preventin

shell script to remove folder from sub directories with different names

I want to remove particular directory named "classes" from all web applications with different names inside webapps folder. For example, I want to remove folde

list of logged in unique users in linux

I am working in linux environment as a non root user. I am using users command to get the logged in users users But it returns the user names multiple times

Execute shell command from python script (RaspberryPi)

I am trying to execute this command sudo mavproxy.py from a python script on raspberrypi. I can execute this in the shell and see it load. The code i have for

How to run grep with while loop in shell script?

I'm trying to make shell script that counts 9 letters words consisted of A, G, C, T in B.txt. First, 9bp_cases.txt contains AAAAAAAAA AAAAAAAAG AAAAAAAAC AAAAAA

How to display /proc/meminfo in Megabytes?

I want to thank you for helping me my related issue. I know if I do a cat /proc/meminfo it will only display in kB. How can I display in MB? I really want to us

Is there a Golang terminal shell? Is it possible for a compiled language? [duplicate]

Recently I'm interested in Golang. When I was learning Python I kicked off a terminal shell and just practised throwing it different data, f

Bash : Find and Remove duplicate files from different folders

I have two folders with some common files, I want to delete duplicate files from xyz folder. folder1: /abc/file1.csv /abc/file2.csv /abc/file3.csv /abc/fil

Confirming Shell Script Input

I'm writing a script to preform a repetitive task that only changes basic values and locations such as user name. I've written up code that prompts for a usern

What is the difference between kill and kill -9?

Can anyone explain the difference between kill and kill -9. Thanks in advance.

How to select two columns from awk and print if they do not match

I need to select two MSISDN values from OMO account Migration logs and print the ones that do not match. [2019-03-11 04:15:08 INFO-SUBAPP ESBRestClient:117] ##

shell-scripting-program show the process hierarchy of that specified process till the parent process whose process id is 1

Write a shell program to enter the process id of a particular process and show the process hierarchy of that specified process till the parent process whose pro

Finding second highest salary using awk

I have a file as follows 1 rob hr 10000 2 charls it 20000 4 kk Fin 30000 5 km it 30000 6 kl it 30000 7 mark hr 10000 8 kc it 30000 9 dc fin 40000 10 m

saving output of nettop to file ( mac ) [closed]

I'm trying to save the output of nettop from my terminal to a text file ( maybe .csv ) what I want to do is be able to isolate the different v