07-30-2019
1. Could you please show what you have tried?
2. Please understand that forum members may not have working knowledge of biology. So when you say, "Print out the number of occurrences for each motif that is found in the bacterial genome", this makes no sense to me (and may not to a lot others too)
3. A good post requesting assistance should in my humble opinion have the following information:
- Clearly state the problem without any ambiguity. Break down your problem into the smallest part where you need help. Posting a question 100 lines long will yield no result. People will yawn and go back to doing their day job.
- Show your attempt at solving the problem. This will help members focus on the exact place where you need help; and not have to dig about and assume where you might be facing the issue.
- One line about your OS, your shell, preferred scripting language..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a very basic bash shell script, which has many "while... done; for .... done" loop clauses, like the following
~~
#!/bin/bash
while blablalba; do
....
done < /tmp/file
for line in `cat blablabla`; do grep $line /tmp/raw ; done > /tmp/1;
while blablalba2; do
....
done <... (2 Replies)
Discussion started by: fedora
2 Replies
2. Shell Programming and Scripting
SEND_MESSAGE=test
echo $SEND_MESSAGE
if
then
echo `date` > update_dt_ccaps.lst
echo "The file transfer failed" >> update_dt_ccaps.lst
SEND_MESSAGE=false
fi
The above code is showing error in bash shell as :
./test: line 5: [: test: integer expression expected
... (2 Replies)
Discussion started by: DILEEP410
2 Replies
3. Shell Programming and Scripting
I'm trying to search all .odt files in a directory for a string in the text of the file.
I've found a bash script that works, except that it can't handle whitespace in the filenames.
#!/bin/bash
if ; then
echo "Usage: searchodt searchterm"
exit 1
fi
for file in $(ls *.odt); do
... (4 Replies)
Discussion started by: triplemaya
4 Replies
4. Shell Programming and Scripting
Hi,
I am working on bash script after a long time. I am getting error near done statement while running a for loop snippet. The error says "Syntax error near unexpcted token 'done'"
please suggest what could be wrong. here is the snippet
elements=${#option_arr} //an array of values... (1 Reply)
Discussion started by: arundhati_s
1 Replies
5. Shell Programming and Scripting
Having issues with an expect script. I've been scripting bash, python, etc... for a couple years now, but just started to try and use Expect. Trying to create a script that takes in some arguments, and then for now, just runs a pwd command(for testing, final will be command I pass).
Here is... (0 Replies)
Discussion started by: cbo0485
0 Replies
6. Shell Programming and Scripting
Hi Folks,
I have a loop that goes through an array and the output is funky.
sample:
array=( 19.239.211.30 )
for i in "${array}"
do
echo $i
iperf -c $i -P 10 -x CSV -f b -t 50 | awk 'END{print '$i',$6}' >> $file
done
Output:
19.239.211.30
19.2390.2110.3 8746886
seems that when... (2 Replies)
Discussion started by: nitrohuffer2001
2 Replies
7. Shell Programming and Scripting
I have the following while loop that I put in a script, demo.sh:
while read rna; do
aawork=$(echo "${rna}" | sed -n -e 's/\(...\)\1 /gp' | sed -f rna.sed)
echo "$aawork" | sed 's/ //g'
echo "$aawork" | tr ' ' '\012' | sort | sed '/^$/d' | uniq -c | sed 's/*\(*\) \(.*\)/\2: \... (3 Replies)
Discussion started by: faizlo
3 Replies
8. Shell Programming and Scripting
Hi Everybody,
I'm a newbie to shell scripting, and I'd appreciate some help. I have a bunch of .txt files that have some unwanted content. I want to remove lines 1-3 and 1028-1098.
#!/bin/bash
for '*.txt' in <path to folder>
do
sed '1,3 d' "$f";
sed '1028,1098 d' "$f";
done
I... (2 Replies)
Discussion started by: BabyNuke
2 Replies
9. Shell Programming and Scripting
Dear all,
Please help with the following.
I have a file, let's call it data.txt, that has 3 columns and approx 700,000 lines, and looks like this:
rs1234 A C
rs1236 T G
rs2345 G T
Please use code tags as required by forum rules!
I have a second file, called reference.txt,... (1 Reply)
Discussion started by: aberg
1 Replies
10. UNIX for Beginners Questions & Answers
Hi everyone
I need some help
I want to create an script which does some processing
it takes the two arguments 201901010000 and 201901020200 - so YYYMMDDHHMM
I want to split processing into hours from start until end,
I dont get why this works but when I add to a future variable... (1 Reply)
Discussion started by: kl1ngac1k
1 Replies
LEARN ABOUT CENTOS
pmnsmerge
PMNSMERGE(1) General Commands Manual PMNSMERGE(1)
NAME
pmnsmerge - merge multiple versions of a Performance Co-Pilot PMNS
SYNOPSIS
$PCP_BINADM_DIR/pmnsmerge [-adfv] infile [...] outfile
DESCRIPTION
pmnsmerge merges multiple instances of a Performance Metrics Name Space (PMNS), as used by the components of the Performance Co-Pilot
(PCP).
Each infile argument names a file that includes the root of a PMNS, of the form
root {
/* arbitrary stuff */
}
The order in which the infile files are processed is determined by the presence or absence of embedded control lines of the form #define
_DATESTAMP YYYYMMDD
Files without a control line are processed first and in the order they appear on the command line. The other files are then processed in
order of ascending _DATESTAMP.
The -a option suppresses the argument re-ordering and processes all files in the order they appear on the command line.
The merging proceeds by matching names in PMNS, only those new names in each PMNS are considered, and these are added after any existing
metrics with the longest possible matching prefix in their names. For example, merging these two input PMNS
root { root {
surprise 1:1:3
mine 1:1:1 mine 1:1:1
foo foo
yawn
yours 1:1:2
} }
foo { foo {
fumble 1:2:1
mumble 1:2:3
stumble 1:2:2 stumble 1:2:2
} }
yawn {
sleepy 1:3:1
}
Produces the resulting PMNS in out.
root {
mine 1:1:1
foo
yours 1:1:2
surprise 1:1:3
yawn
}
foo {
fumble 1:2:1
stumble 1:2:2
mumble 1:2:3
}
yawn {
sleepy 1:3:1
}
To avoid accidental over-writing of PMNS files, outfile is expected to not exist when pmnsmerge starts. The -f option forces the removal
of outfile (if it exists), before the check is made.
The -d option allows the resultant PMNS to optionally contain duplicate PMIDs with different names in the PMNS. By default this condition
is considered an error.
The -v option produces one line of diagnostic output as each infile is processed.
Once all of the merging has been completed, pmnsmerge will attempt to load the resultant namespace using pmLoadASCIINameSpace(3) - if this
fails for any reason, outfile will still be created, but pmnsmerge will report the problem and exit with non-zero status.
CAVEAT
Once the writing of the new outfile file has begun, the signals SIGINT, SIGHUP and SIGTERM will be ignored to protect the integrity of the
new file.
PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the
file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura-
tion file, as described in pcp.conf(5).
SEE ALSO
pmnsadd(1), pmnsdel(1), pmLoadASCIINameSpace(3), pcp.conf(5), pcp.env(5) and pmns(5).
Performance Co-Pilot PCP PMNSMERGE(1)