Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago. Improve this question I am writing a script to compare the file name appended with date(YYY-MM-DD) with date of the file modified. Example:
Tag: shell
Live Linux grep script – only print positive results
I try to code a bash 4 (or sh, if that’s possible) script that does the following: 1st parameter: the path to the compressed modules to search, could be “.” 2nd the search pattern to look for The script so far looks like this (be aware that it is not foolproof, it not checks if both parameters are valid, it
Extra percent sign appears in echo bash
I’ve got the following script below which is supposed to demo CPU utilization: For some reason, when the percentage is echoed out, two percent signs appear instead of the last digit of the number and a percent sign. For example, the output is sometimes 2.7%% instead of 2.72%. Everything works fine when I take the percent sign away, but even
compare two excel sheet and print the difference?
I have two excel sheet (sheetA and sheetB) and I need to compare one column from sheetA with sheetB and print the difference. sheetA sheetB I need to compare “Account Number” with “Customer Number”. All account numbers from sheetA should be present in customer number in sheetB and if sheetB is missing any “account number” then we should print out
Test whether at least one directory with a name prefix exists in bash
I have a script with a user-entered name, and want to determine whether any directories exist starting with that name. This code looks like: It works fine if there is only one such directory: …but it doesn’t work if there are multiple matches: How can I make this work with any number of directories, without assuming that one of the
Understand the basic concept of a Makefile
I have the following makefile which I am trying to upgrade, but there is a certain element which I am not able to understand what means: I understand that $(OBJDIR)/%.o: is obtained by executing the f90 compiler with flags etc. But why do I need the %.o rule, and what does @make mean. Am I missing a general understanding of
Difference between *.* and * when used with the cp command and the -R parameter [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 are some Bash commands both built-in and external?
Some commands are internal built-in Bash commands while others are external (other programs). I see why certain commands need to be built-in. Some of the reasons are: If a command needs to change the internal state of the shell process. If a command performs a very basic operation in the shell. If a command is called often and needs to
Preventing expansion/evaluation of parameter in ssh command
I have a shell script that runs a docker container on a remote server. I’m trying to send the hostname of the remote server into the container but i just get the hostname of my local computer where i run the script. The command looks like this in the script: Both hostname and the environment variable host.hostname becomes the name
Linux SHELL script, read each row for different number of columns
I have file and for example values in it: I need to read values using the shell script from it but number of columns in each row is different!!! I know that if for example I want to read second column I will do it like this (for row number as input parameter) But as I mentioned number of columns