Sponsored Content
Top Forums Shell Programming and Scripting Attach filename to wc results on massive number of files Post 303032280 by Don Cragun on Thursday 14th of March 2019 02:31:02 PM
Old 03-14-2019
How about something more like:
Code:
LIST1=/what/ever/you/want
OUTPUT1=raw_reads_count.table1

while read -r f
do	(	linecount=$(zcat ${f}_R1.fq.gz | wc -l)
		printf '%s\t%s\n' "$f" "$linecount" >> "$OUTPUT1"
	)&
done < "$LIST1"
wait
printf '%s: %s is ready.\n' "${0##*/}" "$OUTPUT1"

This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

awk | stop after specified number of results

I am searching some rather large text files using grep and or awk. What I would like to know is if there is a way (either with grep, awk, or realy any other unix tool) to stop the search when a predifined number of results are returned. I would like to do this for speed purpuses. When i get... (6 Replies)
Discussion started by: evan108
6 Replies

2. UNIX for Advanced & Expert Users

pine does'nt attach files

Hello All, I am maintaining a server and I use pine as MUA and sendmail as MTA. Suddenly many users in the network face the problem of not being able to attach files using pine. I checked the sendmail.cf file and found a variable "MaxMessageSize = 1000000". Eventhough the message size... (2 Replies)
Discussion started by: maybemedic
2 Replies

3. Shell Programming and Scripting

attach 2 files using mailx

if test.dat is the file cat test.dat|uuencode test.dat|mailx -s "subject" mailid can be used for attaching test.dat how can i attach more than one file to a mail using mailx (2 Replies)
Discussion started by: anumkoshy
2 Replies

4. Shell Programming and Scripting

attach multiple files in email

I am trying to send multiple files as attachment in one email, I tried to search but couldn't find. Please let me know if any solutions. (2 Replies)
Discussion started by: mgirinath
2 Replies

5. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

6. Shell Programming and Scripting

How to attach two files in unix script

Hi, My script has to send 2 files as a separate attachment(Note : files to be sent without zipping) to the specified email id. Below code was used but it is not attaching the file as expected instead the file contents are displayed in the body of the email. Kindly,help with your... (22 Replies)
Discussion started by: meva
22 Replies

7. UNIX for Dummies Questions & Answers

massive tarred grib files totally unacceptable

Hi, I have 7 terabytes of tar files, one for every single day since 1980. Inside these tar files are GRIB files, each with 100+ variables. There's 8 GRIBs in each tar, corresponding to different times of the day. I need 6 friggin variables..., and it takes TWO WEEKS TO EXTRACT ALL THE TAR FILES... (3 Replies)
Discussion started by: sammysoil
3 Replies

8. Shell Programming and Scripting

counting the number of characters in the filename of all files in a directory?

I am trying to display the output of ls and also print the number of characters in EVERY file name. This is what I have so far: #!/bin/sh for x in `ls`; do echo The number of characters in x | wc -m done Any help appreciated (1 Reply)
Discussion started by: LinuxNubBrah
1 Replies

9. Shell Programming and Scripting

How to count number of results found?

Hi guys, I'm struggling with this one, any help is appreciated. I have File1 with hundreds of unique words, like this: word1 word2 word3 I want to count each word from file1 in file2 and return how many times each word is found. I tried something like this: for i in $(cat file1); do... (13 Replies)
Discussion started by: demmel
13 Replies

10. Shell Programming and Scripting

Adding filename and line number from multiple files to final file

Hi all, I have 20 files (file001.txt upto file020.txt) and I want to read them from 3rd line upto end of file (line 1002). But in the final file they should appear to start from line 1. I need following kind of output in a single file: Filename Line number 2ndcolumn 4thcolumn I... (14 Replies)
Discussion started by: bioinfo
14 Replies
PLOTCHANGELOG(1)					      General Commands Manual						  PLOTCHANGELOG(1)

NAME
plotchangelog - graph debian changelogs SYNOPSIS
plotchangelog [options] changelog ... DESCRIPTION
plotchangelog is a tool to aid in visualizing a Debian changelog. The changelogs are graphed with gnuplot(1) , with the X axis of the graph denoting time of release and the Y axis denoting the debian version number of the package. Each individual release of the package is repre- sented by a point, and the points are color coded to indicate who released that version of the package. The upstream version number of the package can also be labeled on the graph. Alternatively, the Y axis can be configured to display the size of the changelog entry for each new version. Or it can be configured to display approximately how many bugs were fixed for each new version. Note that if the package is a debian-specific package, the entire package version will be used for the Y axis. This does not always work perfectly. READING THE GRAPH
The general outline of a package's graph is typically a series of peaks, starting at 1, going up to n, and then returning abruptly to 1. The higher the peaks, the more releases the maintainer made between new upstream versions of the package. If a package is debian-only, it's graph will just grow upwards without ever falling (although a bug in this program may cause it to fall sometimes, if the version number goes from say, 0.9 to say, 0.10 - this is interpreted wrong..) If the graph dips below 1, someone made a NMU of the package and upgraded it to a new upstream version, thus setting the debian version to 0. NMU's in general appear as fractional points like 1.1, 2.1, etc. A NMU can also be easily detected by looking at the points that repre- sent which maintainer uploaded the package -- a solitary point of a different type than the points before and after it is typically a NMU. It's also easy to tell by looking at the points when a package changes maintainers. OPTIONS
-l, --linecount Instead of using the debian version number as the Y axis, use the number of lines in the changelog entry for each version. Cannot be used together with --bugcount. -b, --bugcount Instead of using the debian version number as the Y axis, use the number of bugs that were closed by each changelog entry. Note that this number is obtained by searching for "#dddd" in the changelog, and so it may be inaccurate. Cannot be used together with --linecount. -c, --cumulative When used together with either --bugcount or --linecount, graphs the cumulative count rather than the count in each individual changelog entry. -v, --no-version Do not show upstream version labels. Useful if the graph gets too crowded. -m, --no-maint Do not differentiate between different maintainers of the package. -s file, --save=file Save the graph to file in postscript format instead of immediately displaying it. -u, --urgency Use larger points when displaying higher-urgency package uploads. --verbose Output the gnuplot script that is fed into gnuplot (for debugging purposes). -gcommands, --gnuplot=commands This allows you to insert gnuplot(1) commands into the gnuplot script that is used to generate the graph. The commands are placed after all initialization but before the final plot command. This can be used to override the default look provided by this program in arbitrary ways. You can also use things like "set terminal png color" to change the output file type, which is useful in conjunc- tion with the -s option. --help Show a usage summary. --version Display version, author and copyright information. --noconf, --no-conf Do not read any configuration files (see below). changelog ... The changelog files to graph. If multiple files are specified they will all be display on the same graph. The files may be com- pressed with gzip. Any text in them that is not in Debian changelog format will be ignored. CONFIGURATION VARIABLES
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order to set configuration variables. The --no-conf option can be used to prevent reading these files. Environment variable settings are ignored when these configuration files are read. The currently recognised variables are: PLOTCHANGELOG_OPTIONS This is a space-separated list of options to always use, for example -l -b. Do not include -g or --gnuplot among this list as it may be ignored; see the next variable instead. PLOTCHANGELOG_GNUPLOT These are gnuplot commands which will be prepended to any such commands given on the command line. SEE ALSO
devscripts.conf(5). AUTHOR
Joey Hess <joey@kitenet.net> DEBIAN
Debian Utilities PLOTCHANGELOG(1)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy