Sponsored Content
Full Discussion: Tricky Shell script
Top Forums Shell Programming and Scripting Tricky Shell script Post 302132280 by lorcan on Thursday 16th of August 2007 06:42:04 AM
Old 08-16-2007
Post the script output of the script when run as a debug mode, like

ksh -x newfinalscript testingdata

Code:
+ inpFile=input2
+ outFile=/home/Output.txt
+ tmpFile1=/tmp/sample1.txt
+ tmpFile2=/tmp/sample2.txt
+ sortFile=/tmp/sortfile.txt
+ TOTAL_FILEDS=9
+ COUNT=1
+ rm -f /home/vrajiah/Output.txt
+ cat input2
+ echo 00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
+ sed s/00,*//g;s/,$//g
+ wc -c
+ count_fields=     45
+ echo 00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
+ cut -d, -f1-9
+ sed s/00,*//g;s/,$//g
+ wc -c
+ cnt_flds1=     15
+ echo 00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
+ cut -d, -f10-18
+ sed s/00,*//g;s/,$//g
+ wc -c
+ cnt_flds2=     15
+ echo 00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
+ cut -d, -f19-27
+ sed s/00,*//g;s/,$//g
+ wc -c
+ cnt_flds3=     15
+ echo 00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
+ sed s/\(.\{26\}\),\(.\{26\}\),\(.\{26\}\).*/\1\n\2\n\3/g
+ > /tmp/sortfile.txt
+ cut -d, -f1 /tmp/sortfile.txt
+ grep -v 00
+ > /tmp/sample1.txt
+ cut -d, -f1 /tmp/sortfile.txt
+ grep -v 00
+ sort
+ > /tmp/sample2.txt
+ diff /tmp/sample1.txt /tmp/sample2.txt
+ > /dev/null

...

+ COUNT=9
+ cut -d, -f9 /tmp/sortfile.txt
+ grep -v 00
+ > /tmp/sample1.txt
+ cut -d, -f9 /tmp/sortfile.txt
+ grep -v 00
+ sort
+ > /tmp/sample2.txt
+ diff /tmp/sample1.txt /tmp/sample2.txt
+ > /dev/null
+ COUNT=10
+ echo 00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
00,11,21,00,00,55,00,73,83,07,00,22,39,43,00,66,00,00,00,15,00,00,44,58,67,00,87
+ COUNT=1
+ rm -f /tmp/sample1.txt /tmp/sample2.txt /tmp/sortfile.txt
+ exit 0


Last edited by lorcan; 08-16-2007 at 07:52 AM..
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Tricky one...

Here's my problem: I have a laptop running Windows XP Pro with no internal CD or Floppy drives. I want to install Linux on it. I don't care about the Windows XP Pro installation, in fact I would like to install Linux over the entirety of the HD. However I cannot boot from any external CD drive... (1 Reply)
Discussion started by: saabir
1 Replies

2. Shell Programming and Scripting

Tricky Sed

Hello. I am trying to convert occurrences of 'NULL' from a datafile. The 'NULL' occurences appears at this: |NULL| NULL|NULL| NULL|NULL| NULL|NULL| NULL| There should be 52 fields per line. I would like any occurrence of | NULL| or |NULL| to appear as '||' Currently I am using this sed... (2 Replies)
Discussion started by: bestbuyernc
2 Replies

3. Shell Programming and Scripting

Tricky script question

Hi, I'm in the midst of writing a UNIX script that sftp's files to an external host and am stuck with a problem. The problem is that the files created on my server as a order number that correlates to a sequence of directories on the remote host which is where the file should be ftp'ed. ... (3 Replies)
Discussion started by: budrito
3 Replies

4. UNIX for Dummies Questions & Answers

Tricky Quotation Question

Hi, I am at a point in my script where I defined the number of the command line parameter I would like to set a variable equal to: parameter_number=14 I would then like to set a variable equal to the correct parameter: variable=$parameter_number The issue here is that {} is required... (2 Replies)
Discussion started by: msb65
2 Replies

5. Shell Programming and Scripting

Linux: Writing a tricky script to check connectivity

So, first and foremost, I'm having issues with my internet connection. Periodically, the connection drops across the network. The fix is simple enough: restart the modem. However, this gets old when the connection dies out every hour. I can hit my surfboard on 192.168.100.1, and navigate to a... (5 Replies)
Discussion started by: kungfujoe
5 Replies

6. Shell Programming and Scripting

Tricky - Need help on Shell script variables

Hi, I have a requirement in which i have to read a csv file and put data in certain set of variables: File content: VP-DTL-REC-CNT, ,854840,0.00,VP-PAID-AMT, ,0,32280885.17,VP-PAT-PAID-AMT, ,0,9930244.32,VP-PAID-REV-CNT, ,484927,0.00,VP-REJ-CNT, ,369913,0.00, , ,0,0.00, , ,0,0.00, , ,0,0.00, ,... (3 Replies)
Discussion started by: shantoshkumar
3 Replies

7. Shell Programming and Scripting

Tricky data manipulation...

Hi everyone.. I am new here, hello.. I hope this doesn't come across to you folks as a stupid question, I'm somewhat new to scripting :) I'm seeking some help in finding a way to manipulate data output for every two characters - example: numbers.lst contains the following output:... (3 Replies)
Discussion started by: explicit
3 Replies

8. Solaris

Tricky egrep

Hi folks! My first post here. I'm working on a script that retrieves a range of files from a list depending on a range of time. UPDATE: I've seen it could be difficult to read all this thing, so I'll make a summarize it.. How come I do this and take a result.. grep "..\:.." lista.new |... (4 Replies)
Discussion started by: kl0x
4 Replies

9. Shell Programming and Scripting

Tricky sed required

Hi All I need to put some sed together for a task and its a bit advanced for me, so I thought I'd ask if anyone here could help. I have a csv file with content like this - "","abcde","","" "'","abcde","","" "","","","1234" "'e'","","","" I need to remove any single quotes that fall... (17 Replies)
Discussion started by: steadyonabix
17 Replies

10. Shell Programming and Scripting

Parsing xml - tricky one...need help!!

Hi, i am new to linux programming fraternity but looks like starting with a big thing... yes..xml parsing (it is indeed tough for a beginner like me) so need your kind help... The snippet of xml looks like: <snapshot> <tag1> <key>1234</key> <keytype>abcd</keytype> </tag1> <tag2>... (11 Replies)
Discussion started by: rookie2014
11 Replies
PROFTMB(1)							   User Commands							PROFTMB(1)

NAME
proftmb - per-residue prediction of bacterial transmembrane beta barrels SYNOPSIS
proftmb [options] DESCRIPTION
proftmb predicts bacterial transmembrane beta barrels from sequence using profile fed Hidden Markov Models (HMM). Output format Self-annotating. Letters of prediction: 'i' - inside cytoplasm, 'O' - outside cytoplasm, 'U' - up (on chain moving out of cytoplasm), 'D' - down (on chain moving into cytoplasm). References Bigelow, H. and Rost, B. (2006). PROFtmb: a web server for predicting bacterial transmembrane beta barrel proteins. Nucleic Acids Res, 34(Web Server issue), W186-8. To invoke the menu, type: proftmb --menu The options are: -d, --directory-root <STRING> root path where files (options -s,-r,-l,-a,-e,-t,-u,-z,-n) reside -a, --reduction-state-decode <STRING> state reduction for decoding -b, --reduction-state-report <STRING> state reduction for reporting -m, --membrane-strand-states <STRING> list of membrane strand states -z, --z-curve-file <STRING> file containing means and sd's at integral length values -x, --z-calibration-curve <STRING> file mapping coverage and accuracy values to z-scores -n, --null-frequency <STRING> background frequency file -c, --minimum-score-cutoff <DOUBLE> minimum z-score for per-residue prediction -o, --outfile-prefix <STRING> output file prefix for the three files generated: PREFIX_dat.txt, PREFIX_proftmb_pretty.txt PREFIX_proftmb_tabular.txt -s, --static-model-data <STRING> data representing the model architecture -t, --trained-params <STRING> params representing the encoded training data -q, --test-blastQ-file-or-dir <STRING> psiblast profile (-Q) or directory (full pathname or relative to current directory) with many profiles -w, --single-sequence-name <STRING> if -q option points to a single file, this is the name -v, --list-blastQ-files <STRING> list of psiblast files to process in directory (leave blank to process all files) --outfile-pretty <STRING> pretty output file (overrides automatic name PREFIX_proftmb_pretty.txt) --outfile-tab <STRING> tabulated output file (overrides automatic name PREFIX_proftmb_tabular.txt) --outfile-dat <STRING> data output file (overrides automatic name PREFIX_dat.txt) --version <BOOL> output version information and exit --quiet <BOOL> be quiet EXAMPLES
proftmb @/usr/share/proftmb/options -q /usr/share/doc/proftmb/examples/example.Q -o /tmp/example The above produces 3 output files: /tmp/example_proftmb_tabular.txt, /tmp/example_proftmb_pretty.txt and /tmp/example_dat.txt. Compare these to the examples in /usr/share/doc/proftmb/examples. BUGS
Please report bugs at <https://rostlab.org/bugzilla3/enter_bug.cgi?product=proftmb>. COPYRIGHT
Copyright (C) 2004 Henry Bigelow This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. proftmb 1.1.10 February 2012 PROFTMB(1)
All times are GMT -4. The time now is 06:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy