Skip to content
Advertisement

Tag: unix

using only ‘grep’ command to get specific column

This below shows this some lines of csv file, i want to get the results that only get the Population column with only using grep command. results i want: The command i made for this problem was which got results below how can i get rid of the rest of things without using awk sed or any other things? Answer

How to call another shell script from a shell script in Linux

I am trying to create one wrapper script to trigger the parent script at 6AM only. But it is not properly working. It always showing Do Nothing and else part is looping without exit. Can any one help? I want to check if the time is 6 AM and also need to check the string from text file(status). if both

How to delete a subfolder with only a single file under the parent folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

Why is my envsubst command just inserting blank strings?

I’m trying to run the command envsubst < myfile to replace environment variables but instead of being replaced with their values, they are being replaced with blank strings. Here’s my example command (split onto separate lines for clarity): Here are my results: I’m clearly doing something obvious wrong, I just have a silly suspicion it’s one of those things that

Traversing a directory using Makefile

I am making use of a makefile to traverse a directory , store the file names in a variable , extract the file number using regex and print the file number . Below is the code block I am using : LINE 7 is the command in makefile I want to include in the for loop. I want the actual

Filter output of git diff-tree based on file extension

gives me the list all the files that were committed for that SHA. I am looking for a way to get a list of files with only .xml or .html extensions. I checked the documentation page – here and couldn’t see any option. Any help is greatly appreciated. Answer You can use — <path> [<otherpath> …] for this : Be

Advertisement