Sponsored Content
Top Forums Shell Programming and Scripting Text qualifier issue causing data alignment problem Post 302796321 by bakunin on Friday 19th of April 2013 08:21:14 AM
Old 04-19-2013
The solution is quite simple: you search for records with more than 2 double-quotes between any two delimiter-characters (in your case ","). The following regexp should do this. Use grep to search for such lines and grep -v to search for valid lines:

Code:
/,[^,]*"[^,]*"[^,]*"/

Note that this will not find such lines if the problematic field is the first one. Search for such lines with the slightly altered regexp:

Code:
/^[^,]*"[^,]*"[^,]*"/


I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ls command alignment problem

With older Linux servers, the command: ls -al would output text that would have the filenames all lined up in the same column (the owner and group names were truncated to produce a uniform right column). In newer distros (i.e. RHEL 3), the command will push the right column out when owners... (0 Replies)
Discussion started by: robf
0 Replies

2. Solaris

Memory Alignment Problem on Sun Sparcs

Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10. My code to marshal the... (1 Reply)
Discussion started by: nj302
1 Replies

3. UNIX for Dummies Questions & Answers

Variable for -name causing issue in Find command

Hi there, I'm trying to find files that are greater then 30 days old, zip them and move to a different directory. I'm encountering an issue passing a variable (FilesToFind) to name within the find command. Here's the code I'm running: #! /usr/bin/sh FileDir=/home/ariba... (2 Replies)
Discussion started by: ParNone
2 Replies

4. IP Networking

Could a tcp issue be causing a null pointer exception?

The client's app gets a 'suspend error' which they say is due to a null pointer exception. Application people say nothing's wrong with the app. Network people say the network's fine. I'm supposed to see what's wrong with the system to be causing this error. I checked the NIC card settings, which... (1 Reply)
Discussion started by: pmichner
1 Replies

5. Shell Programming and Scripting

Text Alignment Problem

Dear Friends, I've one file "sample.log" with the below comma separated lines: BOND_FORWARD,0 succeeded,0 failed. EQUITY_FORWARD,0 succeeded,0 failed. FRA,12 succeeded,0 failed. OPTION_BAR,16 succeeded,0 failed. OPTION_VAN,76 succeeded,0 failed. RENTOPT_CAP_FLOOR,4775 succeeded,0 failed.... (2 Replies)
Discussion started by: ganapati
2 Replies

6. Shell Programming and Scripting

Output alignment problem

Hi Gurus, This is my raw data. How would I able to format this output into a better alignment? /dev/vg00/lvol5 /home 0.12 GB 0.02 GB 0.10 GB 19% /dev/vg00/misc /misc 28.43 GB 4.92 GB 23.51 GB 17% /dev/vg00/lvol6 /opt 8.25 GB 5.43 GB 2.82 GB 65% /dev/vgsap/ora10264 ... (10 Replies)
Discussion started by: superHonda123
10 Replies

7. HP-UX

HP-UX text alignment

HI all, I tried to edit my files using HP-UX but my output tends to not align when I add another character in the files to edit my files i used the command is as follow chmod +w filename vi filename Help, :eek: (1 Reply)
Discussion started by: jasonhpwong
1 Replies

8. Shell Programming and Scripting

Awk script problem - Variables Causing Issue

can someone please explain to me what i'm doing wrong with this code: WELT=$(awk '(($1 ~ "^${caag}$") || ($2 ~ "^${caag}$"))' /tmp/Compare.TEXT) when run from the command line, it works. but it seems to be having a problem doing the comparison when variables are involved. i tested from... (1 Reply)
Discussion started by: SkySmart
1 Replies

9. Solaris

Solaris 5.8 Upgrade is causing Date format issue.

Hi I have a JAVA based application in development and production environment. These two environments are exactly identical in terms of OS, hardware and application components. Initially the OS was Solaris 5.6 and the application was working fine in both environments. But later when the OS... (12 Replies)
Discussion started by: Jayant Tripathi
12 Replies

10. Shell Programming and Scripting

Add Blank Spaces in text, to perform beter alignment of the string

Hi Guru, I need some advice on how to add blank spaces to the code, rather than me just adding <space-bar spaces> which does not work. Current output of the code File System Backed Up - ALL_LOCAL_DRIVES Daily - Incremental Backup Schedule - 1 Month Retention • 7pm - PRD... (2 Replies)
Discussion started by: Junes
2 Replies
Bio::Tools::Run::EMBOSSacd(3pm) 			User Contributed Perl Documentation			   Bio::Tools::Run::EMBOSSacd(3pm)

NAME
Bio::Tools::Run::EMBOSSacd - class for EMBOSS Application qualifiers SYNOPSIS
use Bio::Factory::EMBOSS; # get an EMBOSS application object from the EMBOSS factory $factory = Bio::Factory::EMBOSS->new(); $application = $factory->program('embossversion'); # run the application with an optional hash containing parameters $result = $application->run(); # returns a string or creates a file print $result . " "; $water = $factory->program('water'); # here is an example of running the application # water can compare 1 seq against 1->many sequences # in a database using Smith-Waterman my $seq_to_test; # this would have a seq here my @seqs_to_check; # this would be a list of seqs to compare # (could be just 1) my $wateroutfile = 'out.water'; $water->run({ -sequencea => $seq_to_test, -seqall => @seqs_to_check, -gapopen => '10.0', -gapextend => '0.5', -outfile => $wateroutfile}); # now you might want to get the alignment use Bio::AlignIO; my $alnin = Bio::AlignIO->new(-format => 'emboss', -file => $wateroutfile); while( my $aln = $alnin->next_aln ) { # process the alignment -- these will be Bio::SimpleAlign objects } DESCRIPTION
The EMBOSSacd represents all the possible command line arguments that can be given to an EMBOSS application. Do not create this object directly. It will be created and attached to its corresponding Bio::Tools::Run::EMBOSSApplication if you set $application->verbose > 0 Call $application->acd to retrive the Bio::Tools::Run::EMBOSSApplication::EMBOSSacd object. See also Bio::Tools::Run::EMBOSSApplication and Bio::Factory::EMBOSS. FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing lists Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: http://redmine.open-bio.org/projects/bioperl/ AUTHOR - Heikki Lehvaslaiho Email: heikki-at-bioperl-dot-org Address: EMBL Outstation, European Bioinformatics Institute Wellcome Trust Genome Campus, Hinxton Cambs. CB10 1SD, United Kingdom APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : $emboss_prog->acd($prog_name); Function: Constructor for the class. Calls EMBOSS program 'acdc', converts the HTML output into XML and uses XML::Twig XML parser to write out a hash of qualifiers which is then blessed. Throws : without program name Returns : new object Args : EMBOSS program name name Title : name Usage : $embossacd->name Function: sets/gets the name of the EMBOSS program Setting is done by the EMBOSSApplication object, you should only get it. Throws : Returns : name string Args : None print Title : print Usage : $embossacd->print; $embossacd->print('-word'); Function: Print out the qualifiers. Uses Data::Dumper to print the qualifiers into STDOUT. A valid qualifier name given as an argment limits the output. Throws : Returns : print string Args : optional qualifier name mandatory Title : mandatory Usage : $acd->mandatory Function: gets a mandatory subset of qualifiers Throws : Returns : Bio::Tools::Run::EMBOSSacd object Args : none Qualifier queries These methods can be used test qualifier names and read values. qualifier Title : qualifier Usage : $acd->qualifier($string) Function: tests for the existence of the qualifier Throws : Returns : boolean Args : string, name of the qualifier category Title : category Usage : $acd->category($qual_name) Function: Return the category of the qualifier Throws : Returns : 'mandatory' or 'optional' or 'advanced' or 'associated' or 'general' Args : string, name of the qualifier values Title : values Usage : $acd->values($qual_name) Function: Return the possible values for the qualifier Throws : Returns : string Args : string, name of the qualifier descr Title : descr Usage : $acd->descr($qual_name) Function: Return the description of the qualifier Throws : Returns : boolean Args : string, name of the qualifier unnamed Title : unnamed Usage : $acd->unnamed($qual_name) Function: Find if the qualifier can be left unnamed Throws : Returns : 0 if needs to be named, order number otherwise Args : string, name of the qualifier default Title : default Usage : $acd->default($qual_name) Function: Return the default value for the qualifier Throws : Returns : scalar Args : string, name of the qualifier perl v5.12.3 2011-06-18 Bio::Tools::Run::EMBOSSacd(3pm)
All times are GMT -4. The time now is 04:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy