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
Tag: unix
Bash script that prints statistics about text files [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 4 years ago. Improve this question I am trying to write a Linux bash script that will
Insert text if column contains a number
I have a tab-delim file that looks like this It should be three columns but some rows are missing the second column (bacterial taxonomy). For these rows I want to move the number to a third column and insert some text (such as Unclassified). I have been attempting to modify some commands I found online to insert Unclassifiedt before any
How to cut string between two search patterns(including search patterns) from a file?
I have a file called applications.txt which contains the following data : The strings in this file contain hostnames which I would like to display as follows : Few of the above servers are UAT and few are PROD servers. As you see the host-names are sandwiched between two patterns: First pattern is -x (lowercase x only), Second pattern is
In a system call are hardware and software context saved?
Who saves the hardware and software context before the system call routine? Is it the processor itself or the software handler? Thanks. Answer Each system call has a wrapper function as already mentioned, each wrapper function triggers interrupt 128, int 0x80, which automatically saves on kernel stack the registers eip, esp, cs, ss, eflags. In the handling function a SAVE_ALL
Static-storage-duration object uniquness guaranties when dynamically loaded from multiple libraries
Imagine that there is a shared library S, there are shared libraries A and B, and an executable C. A and B are linked against S. C is not linked against A and B, instead C dynamically loads A and B via dlopen. S has a static-storage-duration object O with external linkage that is used inside A and B. I
Issue with HH date time format
Need help to identify where is the issue, whether it is a java issue or linux box or something else. My app is running on linux weblogic, app is generating some kind of .tar files on linux with datetimestamp in filename. I am using below snippet to get current time to prepare filename: File format: SA_PART_YYYYMMDD-HHMMSS_sequence.tar below are files from
How to match “whitespace” and “OR” condition with bash script?
I want to match a condition in bash containing “whitespaces” and “OR” condition within strings. I am unable to do as i am new to shell scripting, please help as it going to else loop where it is matching ${myarrlin[1]} . I am getting “Centrify is disabled” but i want the condition to be true here. Here is my code
Pipes in Bash: One at a Time (Line by Line) or All at Once
First, I create 5 files In the following example, xargs seems to get all the results from find via the pipe all at once: In the following example, xargs seems to get all the results from find via the pipe one at a time (line by line): In the following example, xargs seems to get all the results from ‘find’
How to find which column has special characters in a file
I would like to find out which column has special characters in a file For example, I have the data below: Desired output: I want the record number along with the column numbers that have special characters. Answer You didn’t define special character. I will assume that you mean anything outside of the normal ASCII range. Try: How it works: