Skip to content

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

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 Subdir1 Subdir2 Subdir3 Within the, I have: This works for the most part, but it is fragile. If one of the scripts encounters a problem, the script stops. I’d like for it to continue on to the next 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