Category "shell"

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

Replace tags in text file using key-value pairs from JSON file

I am trying to write a shell script that can read a json string, decode it to an array and foreach through the array and use the key/value for replacing strings

Automate mysql_secure_installation with echo command via a shell script

I am trying to automate mysql_secure_installation script with automated response. My code is as follows : echo "& y y abc abc y y y y" | ./usr/bin/mysql_se

^U does not kill despite stty claims

problem: ctrl+U will not kill my terminal program. details: Here are my results from ssty --all: speed 38400 baud; rows 24; columns 80; line = 0; intr =

How to create folder and cd into it with one command

I forget a command,could someone tell me? for example, $ makdir project-one-business-dev-2 $ cd project-one-business-dev-2 I don't want to type project's na