First of all, thank you for your help. I have a problem filtering 2 files using AWK conditionals. The two files I want to filter are these one: Fasta.fa species_id (the file is larger and contain the name of different species) I want to use awk so it puts in fasta.fa the name of the species if both $2 in
Tag: awk
Unexpected characters coming in bash in while loop
I am trying to get IP of a few 1000 domains… below is my program… it shows me sh -x domains-ip.sh $ and ‘ and r is not something I was expecting… Any idea where I am doing wrong? I check While Loop in Bash Unexpected Character but the selected answer I am also using… PS: is there any better
Add a column from one file into another file using AWK for a given condition [closed]
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 1 year ago. Improve this question First of all, thank you for your help. I have 2 files which are And I wanto to filter both
How to get consolidated count of delimiter occurrence
I have a requirement to fetch the count the occurrence of ‘|’ in each line of a file then match the count with given inputcount, needs to throw exception when the count is wrong. Say if the inputcount=3 and the file has following content then exception should get thrown on executing the line 2 and it should exit the file.
How can I select only the rows In file 1 that match column values in file 2?
I have multiple measurements per ‘Subject’ in file 1. I only want to use the highest quality, singular measurement per Subject. In my second file I have the exact list of which measurement is the best for each Subject. This information is contained in the column ‘seriesnumber’. The number in the ‘seriesnumber’ column in file 2 corresponds to the best
To read desired values from file using linux system commands (grep,awk,sed) [closed]
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 1 year ago. Improve this question I have file test.txt contains some variables assigned to some value, i need to read all defined variables for example
grep to read exact data from text file
I have file test1.txt file, i am trying to read variable which is enclosed in double quotes and starting with hyphen for eg: “-color”. i trying to use this grep command cat test1.txt | grep getParm | sed ‘s/getParm(/ /;s/&/ /;s/,/ /;s/”/ /g’ | awk ‘{print $3}’ , where i am not able to read exact data for all variables
get multiple words after a specific word of HTML using linux/unix scripting
i have a file ‘movie.html’ : I want to get multiple word with pipe delimited like this: I tried this code: but the output isn’t as my expectation please help me, i am still a beginner Answer Parsing html with regex is not advised for several reasons (see https://stackoverflow.com/a/1732454/12957340), but here is one potential solution:
How to join command output lines into by separating then with n character [closed]
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 1 year ago. Improve this question I have below data which is just fetching the data which is 80 or more than 80% I am just
how to run complex awk command on remote machine
I am trying to capture the total used memory in % on remote machine as the following so we add backslash as before the “$” as but still with the same errors any advice how to fix this syntax? Answer You also have to escape the double quotes “: