awk error when increasing number of files in folder
I have a folder with several files of which I want to eliminate all of the terms that they have in common using `awk`.
Here is the script that I have been using:
An example of the information in the files would be:
The output should be:
It works when I use a small number of files (i.e. 10), but when I start to increase that number, I get the following error message:
awk: file20_new makes too many open files input record number 27, file file20_new source line number 14
Where is the error coming from when I use larger amounts of files?
---------- Post updated at 17:14 ---------- Previous update was at 17:13 ----------
I'm afraid it will blow up your input file list...
---------- Post updated at 18:33 ---------- Previous update was at 17:14 ----------
OK, I've gotten it now. Appends every file name exactly once to the file list, so you work on the file list again when the total No. of duplicate words is found.
Is the given algorithm correct?
If only the unique words per file should be printed, shouldn't it be
The solution to the problem is the first block; in the next block simply replace all FILENAME by fname.
Hi, I'd like to loop an action over all files with given extension within a folder.
The "main" action is: awk -F "\t" 'BEGIN{OFS="\t"}{if ($10=="S") print$0; }' input.txt > output.txt
The input.txt should be every file in the folder with *.subVCF extension; and the output should be a file... (3 Replies)
Dear folks
I have two data set which there names are "final.map" and "1.geno" and look like this structures:
final.map:
gi|358485511|ref|NC_006088.3| 2044
gi|358485511|ref|NC_006088.3| 2048
gi|358485511|ref|NC_006088.3| 2187
gi|358485511|ref|NC_006088.3| 17654
... (2 Replies)
We have a folder XYZ with large number of files (>350,000). how can i split the folder and create say 10 of them XYZ1 to XYZ10 with 35,000 files each. (doesnt matter which files go where). (12 Replies)
Hi All,
When i give the ls -lrt to list out all files with total number of files , i get the output as
ls -lrt
total 72
-rw-r--r-- 1 hari staff 796 Jul 11 09:17 va.txt
-rw-r--r-- 1 hari staff 169 Jul 13 00:20 a.log
-rwxr-xr-x 1 hari staff 659 Aug... (9 Replies)
Hi All,
Need a for loop which should run for number of files in a folder and should pass the file name as parameter to another shell script for each loop.
Please help me.
Thanks. (2 Replies)
Hi all,
I have text file having a number P100. what i need is when i run a script, it should add 1 to the above number and append it to the next line of a same text file.. when i use the script next time it should check the last line and add 1 to the last number and so on..
like the text... (5 Replies)
Hi
I want to change the number 70 mentioned in my file to 76 by using awk. I know how to change all same digits but not one particular number.
I have 29 files almost similar to this. One of my files looks like
#Input file for 200K NPT molecular dynamics of final 70%XL made from 58.5%... (3 Replies)
Hi All,
I have a folder name as postscript folder and it contains the following postscript files.
package1.ps
package2.ps
package3.ps
when i am renaming all the ps files to xps files by using the following command
mv /postscript/*.ps /postscript/*.xps
Then i am getting the... (4 Replies)