Skip to content
Advertisement

Tag: shell

Grep a line then print awk until a certain substring

My code is But, I want to have $9-$20 be stopped when it hits a value like (0) or (1). This will make my output format and look a lot nicer because anything after (0) or (1) is garbage. Does anyone have an idea on a way to implement that? Input: Output: EDIT: THANK YOU TO ALL THE PEOPLE THAT

Using awk command to go through a text file and incrementing counters for morning, afternoon, and night sections of the script

I am using awk to go through a text file that has information of finished scripts then says complete (morning) then informaton of finished scripts then says complete (afternoon) then information of finished scripts then says complete (night). I am trying to keep track of the finished scripts for each block. The way I am doing it is… However the

Status after each argument passed to -exec in find

I’m writing a quick script to list all the files in a directory, run a function on each of them, and then print out the status code. Now the status code I would like is of the entire transaction and not the last expression that was executed. For example… Let’s say I have the following files file1.txt, file2.txt, file3.txt in

Executing a script from a parent directory?

I have a root directory. In there I have ./bin/ In ./bin/ I have some bash scripts like: These scripts must be ran from ./bin, that is, the working directory must be: however, I would like to do: That last line would set the working directory temporarily to ./bin/ and would execute my script found in ./bin and pass that

Use Xargs to wait for enter key

So, I have a list of files that I want to use to generate a new set of groups of files. I want to open up these groups (multiple files) together at once. Edit them. Then go back to the terminal, hit enter, and open up the next group of files. I’ve got it working, but I’m using a temporary

Advertisement