Category "shell"

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

How to declare a var in bash without it replacing a var in a different file

I have 2 files file1 and file2. Inside file1 I declare a var, x=1. In file2 I make a var x=2. If I run file one then file two, and then in the shell echo x, I g

How to override fish_prompt, keeping the styles from the applied theme?

I installed fish shell, installed few themes. Applied the theme "agnoster", all good is pretty but I want fish_prompt to override the original one and keep the

macOS Terminal: `ls` sorts results with capitalised names first

How can I fix this default sorting behaviour for ls in the macOS Terminal? I want the results to be case-insensitive and alphabetised. Here is an example to il

How to check a public RSA key file

Inside a shell script I want verify public RSA file. All I want to do is that find a way to check this file is a genuine public key file, nothing else. Can I a