Sponsored Content
Top Forums Shell Programming and Scripting Adding gaps to a string in bash Post 302882777 by chacko193 on Thursday 9th of January 2014 06:12:55 AM
Old 01-09-2014
Try this
Code:
aLongSpace="                                                                                                            "
gap=8
frmt_k1d1_test="%s${aLongSpace:0:$gap}%s\n"
echo "$frmt_k1d1_test"

 

8 More Discussions You Might Find Interesting

1. Linux

Searching for gaps in huge (2.2G) log file?

I've got a 2.2 Gig syslog file from our Cisco firewall appliance. The problem is that we've been seeing gaps in the syslog for anywhere from 10 minutes to 2 hours. Currently I've just been using 'less' and paging through the file to see if I can find any noticeable gaps. Obviously this isn't the... (3 Replies)
Discussion started by: deckard
3 Replies

2. OS X (Apple)

Adding Color to bash

Hey everyone, I have come across an issue to where I am trying to create a script which changes the text color with a simple if then statement. I have seen it done with Fedora 8 but when I try and create it using my MacBook Pro running Snow Leopard it doesn't work. Funny thing is, when I use... (2 Replies)
Discussion started by: dachadster13
2 Replies

3. Shell Programming and Scripting

Searching for Gaps in Time

I am very new to shell scripting. We use C-Shell here and I know the issues that surround it. I hope a solution can be created using awk, sed, etc... instead of having to write a program. I have an input file that is sorted by date and time in ascending order ... (2 Replies)
Discussion started by: jclanc8
2 Replies

4. Shell Programming and Scripting

bash adding multiple names

Hi all, I make this bash script in which there is one option to add a name in txt file. So when I run the script it ask me for the name. When i enter the name, that name gets added in a txt file. If i add the same name again, the message comes up, the name is already there My question is..... (2 Replies)
Discussion started by: Learnerabc
2 Replies

5. Shell Programming and Scripting

Sorting and moving file sequence with gaps

Hello, I have lots of sequentially numbered files which make up an image sequence. I'm trying to do two things with it: #1: Find gaps in the sequence and move each range of sequencial files into their own subfolder. #2: Designate a starting point (file) and move every 24th file into... (4 Replies)
Discussion started by: ex_H
4 Replies

6. Shell Programming and Scripting

Adding Content to Variable (bash)

is this possible? its kind of like incrementing the value of a number in a variable. but in this case, instead of the value of the variable being a number, it's just contents/strings/characters/alpha-numeric etc. NOT a number. For instance: VAR=Tommy for all in $(blah blah) do ... (2 Replies)
Discussion started by: SkySmart
2 Replies

7. UNIX for Dummies Questions & Answers

Gaps and frequencies

I have this infile: >GHL8OVD01BNNCA Freq 10 TAGATGTGCCCGTGGGTTTCCCGTCAACACCGGATAGT-GCAGCA-TA >GHL8OVD01CMQVT Freq 1 TTGATGTCGTGGGTTTCCCGTCAACACCGGCAAATAGT-GCAGCA-TA >GHL8OVD01CMQVT Freq 1 TTGATGTGCCAGTTTCCCGTCTAGCAGCACTACCAGGACCTTCGC-TA >GHL8OVD01CMQVW Freq 1... (1 Reply)
Discussion started by: Xterra
1 Replies

8. UNIX for Beginners Questions & Answers

Escape bash-special character in a bash string

Hi, I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
Bio::Coordinate::Result(3pm)				User Contributed Perl Documentation			      Bio::Coordinate::Result(3pm)

NAME
Bio::Coordinate::Result - Results from coordinate transformation SYNOPSIS
use Bio::Coordinate::Result; #get results from a Bio::Coordinate::MapperI $matched = $result->each_match; DESCRIPTION
The results from Bio::Coordinate::MapperI are kept in an object which itself is a split location, See Bio::Location::Split. The results are either Matches or Gaps. See Bio::Coordinate::Result::Match and Bio::Coordinate::Result::Gap. If only one Match is returned, there is a convenience method of retrieving it or accessing its methods. Same holds true for a Gap. 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: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - Heikki Lehvaslaiho Email: heikki-at-bioperl-dot-org APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ add_location Title : add_sub_Location Usage : $obj->add_sub_Location($variant) Function: Pushes one Bio::LocationI into the list of variants. Example : Returns : 1 when succeeds Args : Location object add_result Title : add_result Usage : $obj->add_result($result) Function: Adds the contents of one Bio::Coordinate::Result Example : Returns : 1 when succeeds Args : Result object seq_id Title : seq_id Usage : my $seqid = $location->seq_id(); Function: Get/Set seq_id that location refers to We override this here in order to propagate to all sublocations which are not remote (provided this root is not remote either) Returns : seq_id Args : [optional] seq_id value to set Convenience methods These methods are shortcuts to Match and Gap locations. each_gap Title : each_gap Usage : $obj->each_gap(); Function: Returns a list of Bio::Coordianate::Result::Gap objects. Returns : list of gaps Args : none each_match Title : each_match Usage : $obj->each_match(); Function: Returns a list of Bio::Coordinate::Result::Match objects. Returns : list of Matchs Args : none match Title : match Usage : $match_object = $obj->match(); #or $gstart = $obj->gap->start; Function: Read only method for retrieving or accessing the match object. Returns : one Bio::Coordinate::Result::Match Args : gap Title : gap Usage : $gap_object = $obj->gap(); #or $gstart = $obj->gap->start; Function: Read only method for retrieving or accessing the gap object. Returns : one Bio::Coordinate::Result::Gap Args : purge_gaps Title : purge_gaps Usage : $gap_count = $obj->purge_gaps; Function: remove all gaps from the Result Returns : count of removed gaps Args : perl v5.14.2 2012-03-02 Bio::Coordinate::Result(3pm)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy