annotate funny.bash @ 41:d129c3d0e920 draft default tip

planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
author richard-burhans
date Mon, 28 Jul 2025 14:35:28 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
1 #!/usr/bin/env bash
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
3 taskset -p $$ | sed -e 's/^.*: //' | awk '
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
4 BEGIN {
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
5 split("0 1 2 3 4 5 6 7 8 9 a b c d e f", hex_chars, " ")
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
6 split("0 1 1 2 1 2 2 3 1 2 2 3 2 3 3 4", vals, " ")
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
7 for (i in hex_chars) {
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
8 ones[hex_chars[i]] = int(vals[i])
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
9 }
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
10 total = 0
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
11 }
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
12
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
13 {
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
14 split($0, chars, "")
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
15 for (i in chars) {
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
16 if (chars[i] in ones) {
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
17 total += ones[chars[i]]
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
18 }
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
19 }
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
20 print total
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
21 }
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
22 '
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
23
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
24
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
25 # 0 0000 0
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
26 # 1 0001 1
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
27 # 2 0010 1
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
28 # 3 0011 2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
29 # 4 0100 1
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
30 # 5 0101 2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
31 # 6 0110 2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
32 # 7 0111 3
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
33 # 8 1000 1
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
34 # 9 1001 2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
35 # a 1010 2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
36 # b 1011 3
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
37 # c 1100 2
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
38 # d 1101 3
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
39 # e 1110 3
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
40 # f 1111 4
d129c3d0e920 planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
richard-burhans
parents:
diff changeset
41