Releases: douglasgscofield/tinyutils
1.5
Add inverse=
option to inrange
, line
and lwhich
, to reverse the sense of the request; similar to grep -v
.
Add around=
option to line
, for use with line=
, to print context lines preceding and following the line specified with line=
; similar to grep -C
.
Fix a bug in line
where it failed to stop reading the input as early as it could have.
1.4
Add stride mode to line
, which uses the stride=
, first=
and chunk=
parameters. Stride mode is active when stride=
is set to a positive value; defaults for other parameters are first=1
and chunk=1
. In stride mode, line
prints chunk
lines every stride
lines, starting with the first
line.
To print the name and sequence of each entry in a FastQ file and convert it to Fasta:
line stride=4 chunk=2 reads.fq | sed 's/^@/>/'
1.3
Add line
, which prints a specific line of the input using the option line=
or a range of lines using min=
and/or max=
, or both. To print the header (first) line of a file and lines 101 to 200:
line line=1 min=101 max=200 file.txt
Add lwhich
, which reports the line number(s) at which a value (val=
) is found in a column (col=
, which defaults to 1 as with all tinyutils which operate on columns). To find the line number(s) of the longest line(s) in file.txt:
len file.txt | lwhich val=$(len file.txt | max)
Added the Makefile targets 'make linkscript
' and 'make copyscript
', which create scripts linkscript.sh
and copyscript.sh
, respectively. These will, when run, create symbolic links in the current directory to all tinyutils or make copies of all tinyutils into the current directory. Useful for setting up tinyutils for command-line use. If $HOME/bin
is included in the PATH
, this will create symbolic links to all tinyutils so they can be found by the shell:
make linkscript
T=$PWD
cd $HOME/bin
$T/linkscript.sh
1.2
Add histbin
which bins values into right-open bins of a given size, bin=10
by default, with boundaries modulo bin
. Output is the left-closed boundary of each bin and the count.
histbin bin=1000 contiglengths.txt