Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 months ago. Improve this question Screenshot of my users i am trying to count total amount of users that i created in linux. I found out a script that works,
Tag: shell
parsing ethtool command output using sed and awk
I am working on a shell script to parse the advertised mode and supported mode from the ethtool command and match them against an expected value. The idea is both expected and supported modes should have a common value to pass the condition. Data: I have currently used the below for the same. The above code is giving the correct
Multi-Process Shell in C, using Pipes [Linux]
I’m trying to code a shell in C that supports multi-pipe process handling, depending on the amount of separate processes given by the user, and each separated by a “|” symbol. The shell forks the amount of processes into a child for each process. Here’s an example: result: 1 But I’m having trouble with communicating between children and finally to
How to create an executable file with SSM and basic commands on ubuntu
Hello everyone I would like to ask for your assistance regarding scenario below. using my local ubuntu machine I want to access and create an executable to my AWS Instance machine. I tried to use same commands with my executable file however it doesn’t work, but works if I just paste the command on my CLI, it doesn’t push thru
Process “aws ecs list-tasks” JSON output with “aws ecs execute-command”?
For example do this command. then it returns below then do next command using the ae340032378f4155bd2d0eb4ee60b5c7 of return sentence. I want to do this thing in one sentence, or shell script. Is it possible? I googled around the regular expression, but still unclear. Could you give some help? Answer Manipulate JSON with jq jq is the best tool for manipulating
How to monitor all network traffic from a specific process in linux?
I want to monitor and log all traffic that a specific process produces. I know about tcpdump, but it seems it doesn’t support filtering by process (pid/path, or at least user). It there any other way to log all traffic from a process? Ideally I should be able to filter ports as well. Thanks! Answer You should use strace command:
Execute a command on all the files within a directory
I am trying to write a bash script that could automate a programme on all the files present in a directory. The files that are in my directory are in the .nii or .nii.gz format. The command that I have to write is InputFile is the name of the file that has to be processed by the programme, and OutputFile
Find and Execute Scripts in Subdirectories
I have a filesystem structured like this: Parent Directory orchestrator init.sh Subdir1 install.sh Subdir2 install.sh Subdir3 install.sh Within the init.sh, I have: This works for the most part, but it is fragile. If one of the install.sh scripts encounters a problem, the init.sh script stops. I’d like for it to continue on to the next install.sh script if this happens.
Understand shell script interpreter with custom shell [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 months ago. Improve this question I try to understood how shell script interpreter working. for example i wrote custom shell with c++ : now i wrote a script like this
Find and replace match after string in different file from bash script – not working
I have a string stored in a variable called newOccupation in file2.sh. When I run file2.sh, I would like it to replace whatever is after the word “occupation=” with the string stored in newOccupation. So in this case, after running the script, occupation=”Cashier” should be changed to occupation=”Teacher” I tried to replicate something from a very similar thread here Find