Sponsored Content
Full Discussion: trimming white spaces
Top Forums Shell Programming and Scripting trimming white spaces Post 302088969 by briskbaby on Friday 15th of September 2006 11:07:12 AM
Old 09-15-2006
Thanks for quick response! When I do this I get a bad substitution error... do I need to put the % or the *? What is their function?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

deleting white spaces

How would I delete white spaces in a specified file? Also, I'd like to know what command I would use to take something off a regular expression, and put it onto another. ie. . . . expression1 <take_off> . . . expression2 (put here) . . . Any help would be great, thanks! (10 Replies)
Discussion started by: cary530
10 Replies

2. Shell Programming and Scripting

delete white spaces

hi all... i have the next question: i have a flat file with a lot of records (lines). Each record has 10 fields, which are separated by pipe (|). My problem is what sometimes, in the first record, there are white spaces (no values, nothing) in the beginning of the record, like this: ws ws... (2 Replies)
Discussion started by: DebianJ
2 Replies

3. Solaris

spaces trimming while assigning to a variable

Hi my lovely friends, Im writing one pgm in which i trying to assign some values like $var='Jun 6' but if i do echo of this $var will trim the spaces expect one space. $echo $var $Jun 6 But if var='Jun 28', then this will works fine $echo $var $Jun 28 this is required to exctract... (2 Replies)
Discussion started by: Lokesha
2 Replies

4. Shell Programming and Scripting

Two or more white spaces in string

Hi, Can anybody suggest me how to combine two strings with two or more white spaces and assign it to a variable? E.g. first=HAI second=HELLO third="$first $second" # appending strings with more than one white spaces echo $third this would print HAI HELLO Output appears... (2 Replies)
Discussion started by: harish_oty
2 Replies

5. UNIX for Advanced & Expert Users

Trimming the spaces

Hi, How can I remove the unwanted spaces in the line. 123456 789 ABC DEF. - I wanna remove the sapces in this line, I need the output 123456789ABCDEF. Pls help me...... (3 Replies)
Discussion started by: sharif
3 Replies

6. UNIX for Dummies Questions & Answers

Problem with Trimming of white space

Dear Members, Following is the code which i am using: integer i=7 while ((i <= 10 )); do param=`echo $TEST_OUT | cut -d"^" -f$i` a=`echo ${param}` echo `echo $a | sed 's/+/ /g'` (( i = i + 1)); done From the above code TEST_OUT is a variable which has the following value: ... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

7. Shell Programming and Scripting

trimming out spaces in solaris

friends, I have a script in solaris 10 SPARC system which is like this date '+Time: %m/%d/%y %H:%M:%S' echo " GDBRR GDLRR GDBWR GDLWR GDRRR GDRWR " sar -b 10 10 |/usr/xpg4/bin/awk '!/Average/ && !/SunOS/ && !/bread/ {$1="";T=$2;T1=$3;T2=$5;T3=$6;T4=$8;T5=$9}{print(T"\t",... (1 Reply)
Discussion started by: achak01
1 Replies

8. Shell Programming and Scripting

How can I stop the unix script from trimming extra spaces?

I have a file which contains certain records about users. the row length is always fixed to 205 characters. Now I want to read each record line from the file, substring some portion out of it and put into another file. But I have observed that my script is trimming the extra spaces I have used for... (4 Replies)
Discussion started by: Pramit
4 Replies

9. Shell Programming and Scripting

Trimming spaces from a variable

Hi guys, when I take substring of a particular data using this command var=substr($0,11,10) it comes with spaces, when I am trying to trim the spaces it is not allowing me to do that. Can you please help me out on that. As I have to reverse the output of the variable also. ---------- Post... (0 Replies)
Discussion started by: manish8484
0 Replies

10. Shell Programming and Scripting

Trimming Spaces in Unix

Hi All, I am using following script to name the file base of some values #!/bin/sh sourcefile=$1 awk ' BEGIN{ n = 1; name = "FILEFILE12" n ".txt"; } { if (substr($0,1,10) == "FILEFILE12") { close (name) n++ a = substr($0,11,10); b = substr($0,21,5); name = b "_Src_" a ".txt" }... (6 Replies)
Discussion started by: manish8484
6 Replies
Bio::Graphics::Wiggle::Loader(3pm)			User Contributed Perl Documentation			Bio::Graphics::Wiggle::Loader(3pm)

SYNOPSIS
my $loader = Bio::Graphics::Wiggle::Loader->new('/base/directory/for/wigfiles','wibfilename'); my $fh = IO::File->new('uploaded_file.txt'); $loader->load($fh); my $gff3_file = $loader->featurefile('gff3',$method,$source); my $featurefile = $loader->featurefile('featurefile'); USAGE
This module loads Bio::Graphics::Wiggle files from source files that use Jim Kent's "WIG" format: http://genome.ucsc.edu/google/goldenPath/help/wiggle.html Several data sets can be grouped together in a single WIG source file. The load() method accepts the path to a WIG source file, and will create one or more .wib ("wiggle binary") databases of quantitative data in the directory indicated when you created the loader. Call the featurefile() method to return a text file in either GFF3 or Bio::Graphics::FeatureFile format, suitable for loading into a gbrowse database. METHODS $loader = Bio::Graphics::Wiggle::Loader->new('/base/directory' [,'my_data']) Create a new loader. The first argument specifies the base directory in which the loaded .wib files will be created. The second argument specifies the base name for the created .wib files, or "track" if not specified. $loader->load($fh) Load the data from a source WIG file opened on a filehandle. $data = $loader->featurefile($type [,$method,$source]) Return the data corresponding to a GFF3 or Bio::Graphics::FeatureFile. The returned file will have one feature per WIG track, and a properly formatted "wigfile" attribute that directs Bio::Graphics to the location of the quantitative data. $type is one of "gff3" or "featurefile". In the case of "gff3", you may specify an optional method and source for use in describing each feature. In the case of "featurefile", the returned file will contain GBrowse stanzas that describe a reasonable starting format to display the data. $loader->allow_sampling(1) If allow_sampling() is passed a true value, then very large files (more than 5 MB) will undergo a sampling procedure to find their minimum and maximum values and standard deviation. Otherwise, file will be read in its entirety to generate those statistics. EXTENSIONS Several extensions to the WIG format "track" declaration are recognized. transform=<transform> Specify a transform to be performed on all numeric data within this track prior to loading into the binary wig file. Currently, the following three declarations are recognized: transform=logtransform y' = 0 for y == 0 y' = log(y) for y > 0 y' = -log(-y) for y < 0 transform=logsquared y' = log(y**2) for y != 0 y' = 0 for y == 0 transform=none y' = y (no transform - the default) trim=<trim> Specify a trimming function to be performed on the data prior to scaling. Currently, the following trim functions are recognized: trim=stdev1 trim to plus/minus 1 standard deviation of the mean trim=stdev2 trim to plus/minus 2 standard deviations of the mean (default) trim=stdevN trim to plus/minus N standard deviations of the mean trim=none no trimming Example entended track declaration: track type=wiggle_0 name="example" description="20 degrees, 2 hr" trim=stdev2 transform=logsquared SEE ALSO
Bio::Graphics::Wiggle, Bio::Graphics::Glyph::wiggle_xyplot, Bio::Graphics::Glyph::wiggle_density, Bio::Graphics::Panel, Bio::Graphics::Glyph, Bio::Graphics::Feature, Bio::Graphics::FeatureFile AUTHOR
Lincoln Stein <lstein@cshl.org>. Copyright (c) 2007 Cold Spring Harbor Laboratory This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty. perl v5.14.2 2012-02-20 Bio::Graphics::Wiggle::Loader(3pm)
All times are GMT -4. The time now is 07:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy