We have the following file:     cat info.txt  linux03.sys98.com net16777728       Speed: 1000Mb/s linux03.sys98.com net16777728       Speed: 1000Mb/s linux01.sys98.com net3f0    Speed: 1000Mb/s linux01.sys98.com net3f0    Speed: 1000Mb/s  linux03.sys98.com net16777728       Duplex: Full linux03.sys98.com net16777728       Duplex: Full linux01.sys98.com net3f0    Duplex: Full linux01.sys98.com net3f0    Duplex: Full  linux04.sys98.com net3f2    Link detected: no linux04.sys98.com net3f3    Link detected: no  linux04.sys98.com net3f2    Speed: Unknown! linux04.sys98.com net3f3    Speed: Unknown!  linux04.sys98.com net3f2    Duplex: Unknown! (255) linux04.sys98.com net3f3    Duplex: Unknown! (255)  linux03.sys98.com net16777728       Link detected: yes linux03.sys98.com net16777728       Link detected: yes linux01.sys98.com net3f0    Link detected: yes linux01.sys98.com net3f0    Link detected: yes   We want to align the third word with 20 spaces from the beginning of the second word as the following expected results:   linux03.sys98.com net16777728          Speed: 1000Mb/s linux03.sys98.com net16777728          Speed: 1000Mb/s linux01.sys98.com net3f0               Speed: 1000Mb/s linux01.sys98.com net3f0               Speed: 1000Mb/s  linux03.sys98.com net16777728          Duplex: Full linux03.sys98.com net16777728          Duplex: Full linux01.sys98.com net3f0               Duplex: Full linux01.sys98.com net3f0               Duplex: Full  linux04.sys98.com net3f2               Link detected: no linux04.sys98.com net3f3               Link detected: no  linux04.sys98.com net3f2               Speed: Unknown! linux04.sys98.com net3f3               Speed: Unknown!  linux04.sys98.com net3f2               Duplex: Unknown! (255) linux04.sys98.com net3f3               Duplex: Unknown! (255)  linux03.sys98.com net16777728          Link detected: yes linux03.sys98.com net16777728          Link detected: yes linux01.sys98.com net3f0               Link detected: yes linux01.sys98.com net3f0               Link detected: yes   How to perform that with printf or any other solution?
122578
the following syntax print the output1 down   echo "$status"    output1:      component_name : TEZ_CLIENT     recovery_enabled : true     component_name : WEBHCAT_SERVER         recovery_enabled : true     component_name : YARN_CLIENT            recovery_enabled : true     component_name : ZKFC           recovery_enabled : true     component_name : ZOOKEEPER_CLIENT             recovery_enabled : true     component_name : ZOOKEEPER_SERVER                      recovery_enabled : true   how to add the printf syntax in order to get the following lines:  expected output      component_name : TEZ_CLIENT             recovery_enabled : true     component_name : WEBHCAT_SERVER         recovery_enabled : true     component_name : YARN_CLIENT            recovery_enabled : true     component_name : ZKFC                   recovery_enabled : true     component_name : ZOOKEEPER_CLIENT       recovery_enabled : true     component_name : ZOOKEEPER_SERVER       recovery_enabled : true
40934
I have a couple of big text files and in the file UNIQS.txt I have a list of strings to grep from another file. The code I use is  grep -f UNIQS.txt EEP_VSL.uniqs.sam &gt; UNIQ_templates.sam   which does nothing - the file generated is empty. But when I do  grep -F -f UNIQS.txt EEP_VSL.uniqs.sam &gt; UNIQ_templates.sam   it works correctly. This confuses me because I didn't think grep would interpret the entries in UNIQS.txt as regexp patterns without quotes and slashes and so on being in the file (which there aren't). Is it the case in general that if you are getting the patterns from a file then it will automatically think that they are regexp patterns?  Edit: In the UNIQS.txt file, there are newline separated strings of the form  HWI-ST365:215:D0GH0ACXX:2:1101:10034:186783   (called template names) and the file EEP_VSL... tab separated columns, with about 14 columns and the first column is the template name, so basically I want to extract the line corresponding to each template in the file.
47096
I need something like this:  \left\{ first line  (1a) second line (1b) third line  (1c) \right.   all lines should be aligned to left
2867
I have 2 large files (3000 columns, 15000 rows) of the following format  file1 (tab-separated):  1/0 0/0 0/0 0/0 1/1 0/0 1/1 0/1 0/0   file2 (tab-separated):  3 5 2 1 7 10 3 4 3   I'd like to combine the values from the first column of each file with a ":" separator, then move on to the second, third, etc. columns.  Desired output (tab-separated):  1/0:3 0/0:5 0/0:2 0/0:1 1/1:7 0/0:10 1/1:3 0/1:4 0/0:3   Efficiency isn't critical, so any language is fine. I apologize if this has been asked before.
73988
Everybody knows :-) that in Windows plain text files lines are terminated with CR+LF, and in Unix&amp;Linux - with LF only. How can I quickly convert all my source code files from one format to another and back?
99818
I am trying to open file 1 which has the following format  20336 20337 20338 . . . 71644 71645 71646   and write to second column number 20336 so the new file will have the following format  20336 20336 20337 20336 20338 20336 .     . .     . .     . 71644 20336 71645 20336 71646 20336
123086
Just out of curiousity.. Why are the line endings different for Windows and Unix.  I was looking around for the answer but not found.
70116
Suppose there are two files in web/ named foo.php and bar.php. The 1st line of foo.php is "sdajgeSTRINGdsad" and the 10th line of bar.php is "gdfhu98324STRING". The task is to first locate these two files, then delete 1st line of foo.php and 10th line of bar.php given that the specified string is "STRING".
55257
I have the following files   SSt12.precip.374.sub.climatology.ctl SSt12.precip.2874.sub.climatology.ctl SSt12.precip.3764.sub.climatology.ctl SSt12.precip.6774.sub.climatology.ctl   I want to rename the files as   SSt12.precip.1.sub.climatology.ctl SSt12.precip.2.sub.climatology.ctl SSt12.precip.3.sub.climatology.ctl SSt12.precip.4.sub.climatology.ctl
94270
The command that I have prints out two of the lines whenever FW_6.0.0 is found, below is the code:  grep -oP 'FW_6.0.0, (.*)$' file   Below is the output, both has the same value of FW_6.0.0  FW_6.0.0, SUCCESS FW_6.0.0, OK   I would like to match two words, that is FW_6.0.0 and SUCCESS that can be found on the same line so that it prints this out:  FW_6.0.0, SUCCESS and eliminates FW_6.0.0, OK
91459
I have file1 likes:  0   AFFX-SNP-000541  NA 0   AFFX-SNP-002255  NA 1   rs12103          0.6401 1   rs12103_1247494  0.696 1   rs12142199       0.7672   And a file2:  0   AFFX-SNP-000541   1 0   AFFX-SNP-002255   1 1   rs12103           0.5596 1   rs12103_1247494   0.5581 1   rs12142199        0.4931   And would like a file3 such that:  0   AFFX-SNP-000541     NA       1 0   AFFX-SNP-002255     NA       1 1   rs12103             0.6401   0.5596 1   rs12103_1247494     0.696    0.5581 1   rs12142199          0.7672   0.4931   Which means to put the 4th column of file2 to file1 by the name of the 2nd column.
3477
I don't quite understand how the computer reads this command.  cat file1 file2 1&gt; file.txt 2&gt;&amp;1  If I understand, 2&gt;&amp;1 simply redirect Standard Error to Standard Output.  By that logic, the command reads to me as follows:    concatenate files file1 and file2.  send stdout from this operation to file.txt. send stderr to stdout. end?   I'm not sure what the computer's doing. By my logic, the command should be   cat file1 file2 2&gt;&amp;1 &gt; file.txt   but this is not correct.
113861
I have 2 text files. Lets name them file1.txt and file2.txt  file1.txt is as follows  chr10   181144  225933 chr10   181243  225933 chr10   181500  225933 chr10   226069  255828 chr10   255989  267134 chr10   255989  282777 chr10   267297  282777 chr10   282856  283524 chr10   283618  285377 chr10   285466  285995   file2.txt is as follows  chr10   181144  225933 chr10   181243  225933 chr10   181500  225933 chr10   255989  282777 chr10   267297  282777 chr10   282856  283524 chr10   375542  387138 chr10   386930  387138 chr10   387270  390748 chr10   390859  390938 chr10   391051  394580 chr10   394703  395270   What I want to output in a single file is    All the common lines between file1 and file2 All the lines which are in file1 but are not common to both All the lines which are in file2 but are not common to both.   I wrote a Perl script to do this but I am pretty sure there must be a command line or an easier way to do it.
17335
file_A (~500MB, 1.6M lines) consists of all equal length search terms, 1 per line, not sorted.  file_B consists of all equal length text lines, 1 per line, not sorted  I've been able to run "grep -F -f file_A file_B >> output.txt" with any size file_B without problem on a box with 52GB ram. Problem is I'm now limited to 4GB ram and thus the size of file_A is now too large for this to run without exhausting available memory.  Short of manually chopping up file_A into smaller bites, is there any easy way to script this to grep for first 1000 lines of file_A, then when thats finished to automatically grep for lines 1001-2000, ect. until I've gone through all of file_A?
43285
findstr /v "black"  File1.txt   Above DOS command will display content of 'File1.txt' which are not matching string "black".  How to modify this command , if I need to filter words "black" and "white" ?
60068
Below is my input file:  PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.177, 2 PS Sensor Value = -5.501000 , Min = -5.583000 , Max = -5.319000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.210, 3 PS Sensor Value = 15.996000 , Min = 15.814000 , Max = 16.078000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.231, 4 PS Sensor Value = -16.505000 , Min = -16.587000 , Max = -16.323000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.263, 5 PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:16:46.523.302, 6 PS Sensor Value = 4.002000 , Min = 3.820000 , Max = 4.084000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.481.557, 1 PS Sensor Value = 6.199000 , Min = 6.017000 , Max = 6.281000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.518.691, 2 PS Sensor Value = -5.503000 , Min = -5.585000 , Max = -5.321000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.156, 3 PS Sensor Value = 15.996000 , Min = 15.814000 , Max = 16.078000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.195, 4 PS Sensor Value = -16.505000 , Min = -16.587000 , Max = -16.323000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.221, 5 PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:17:46.523.240, 6 PS Sensor Value = 4.002000 , Min = 3.820000 , Max = 4.084000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.480.644, 1 PS Sensor Value = 6.199000 , Min = 6.017000 , Max = 6.281000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.615, 2 PS Sensor Value = -5.501000 , Min = -5.583000 , Max = -5.319000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.729, 3 PS Sensor Value = 15.996000 , Min = 15.814000 , Max = 16.078000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.765, 4 PS Sensor Value = -16.505000 , Min = -16.587000 , Max = -16.323000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.788, 5 PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2,1,3,/vobs/atlas-idc/src/utils/logger/IDCLogger/IDC.cpp,48,19:18:46.522.810, 6 PS Sensor Value = 4.002000 , Min = 3.820000 , Max = 4.084000   I need to compare the PS Sensor Value, Min and Max value. (Min greater than PS Sensor greater than Max)   I'm expecting the output like below and here I should have only the normal lines.  What is normal lines? :  If Min value greater than PS Sensor value &amp;&amp; PS Sensor value  is greater than Max value then the line is normal lines and that should removed.        Expected Output:                                                                                                                                    PA43410-2  PS Sensor Value = 6.509000 , Min = 6.327000 , Max = 6.591000 PA43410-2 PS Sensor Value = 6.199000 , Min = 6.017000 , Max = 6.281000  Eg:     If   Min &lt; PS sensor value &lt; Max,    // Don’t care the normal  lines.          Throw this line away.    Else           Pull this line to consolidated new file. //Only focus on abnormal lines.
60067
I have 2 files. The first, fileA looks like  TCONS_00000066  XLOC_000030     -       u       q1:XLOC_000030|TCONS_00000066|0|0.000000|0.000000|0.000000|0.000000|- TCONS_00000130  XLOC_000057     -       u       q1:XLOC_000057|TCONS_00000130|0|0.000000|0.000000|0.000000|0.000000|- TCONS_00000395  XLOC_000206     -       u       q1:XLOC_000204|TCONS_00000393|0|0.000000|0.000000|0.000000|0.000000|-   FileB looks like:  &gt;TCONS_00000001 gene=XLOC_000001 AGATGAGCTGGTGGGGATGCTCTAAGAGAACGAGAGAAGCACAGAGCAGATAAACCACACCCACAGGCAC CACCGTCCTTGTTGGTAATGAAGAAGACGAGACGACGACTTCCCCACTAGGAAACACGACGGAGGCGGAG ATGATCGACGGCGGAGAGAGCTACAGAAACATCGATGCCTCCTGTCCAATCCCCCCATCCCATTCGGTAG TTGGATTGAAGACTACCGAATAAGAGAAGCAGGCAGGCAGACAAACCCTTGAACCAAGGAGTCCTCGCTG AGGAAGCTTTGGATCCACGACGCAGCTATGGCCTCCCCGCCCACCAGGCCGCCAGCCACAACCAGCTGAC TAGGTCGCATGCATCATCAGATTTCAATCTCCCTTCGTTCCCTGTCCCTAATCCAATACCAATAGGGAGC AATCAGCTGCTCCTCGACGGCGAGGGAGATGTCGTCGGCCGCGGGCCAAGACAACGGAGATACCGCTGGG GACTACATCAAGTGGATGTGCGGCGCCGGTGGCCGTGCGGGCGGCGCCATGGCCAACCTCCAGCGCGGCG TTGGCTCCCTCGTCCGTGACATTGGCGACCCCTGCCTCAACCCATCCCCCGTTAAGGGGAGCAAAATGCT CAAACCGGAAAAATGGCACACATGTTTTGATAATGATGGAAAGGTCATAGGTTTCCGTAAAGCCCTAAAA TTCATTGTCTTAGGGGGTGTGGATCCCACTATTCGAGCTGAAGTTTGGGAATTTCTTCTTGGCTGCTATG CCTTGAGTAGTACCTCAGAGTATAGGAGGAAACTAAGAGCTGTTAGAAGGGAAAAATATCAAATTTTAGT TAGACAGTGCCAGAGCATGCACCCAAGCATTGGTACAGGTGAGCTTGCTTACGCTGTTGGATCAAAGCTA   Now, fileA contains selected transcript numbers in the first column and fileB contains sequences of all transcripts. I want to scan fileB for the first column of fileA and print the trailing sequences of matching transcripts along with the transcript number.