Sponsored Content
Top Forums Shell Programming and Scripting append out on particular line number Post 302530781 by learnbash on Wednesday 15th of June 2011 03:22:16 AM
Old 06-15-2011
append out on particular line number

I want to append output of below command to a file name "final" mentioned on line number 9.

Code:

sed 's/peter/xyz/g' ttc >> final

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending line number to each line and getting total number of lines

Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me. I have a file say: abc def ccc ddd ffff The output should be: Instance1=abc Instance2=def Instance3=ccc Instance4=ddd Instance5=ffff ... (2 Replies)
Discussion started by: chiru_h
2 Replies

2. Shell Programming and Scripting

Adding a columnfrom a specifit line number to a specific line number

Hi, I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers. To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies

3. Shell Programming and Scripting

Joining lines in reverse. append line 1 to line 2.

Hi I have used many times the various methods to append two lines together in a file. This time I want to append the 1st line to the second and repeat for the complete file.... an example This is the file owns the big brown dog joe owns the small black dog jim What I want is ... (7 Replies)
Discussion started by: dwalley
7 Replies

4. Shell Programming and Scripting

how to get the data from line number 1 to line number 100 of a file

Hi Everybody, I am trying to write a script that will get some perticuler data from a file and redirect to a file. My Question is, I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line. I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies

5. UNIX for Dummies Questions & Answers

How to read contents of a file from a given line number upto line number again specified by user

Hello Everyone. I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below: if ; then if ; then tail +$1 $3 | head -n $2 else ... (5 Replies)
Discussion started by: grc
5 Replies

6. Shell Programming and Scripting

Write $line number into textfile and read from line number

Hello everyone, I don't really know anything about scripting, but I have to manage to make this script, out of necessity. #!/bin/bash while read -r line; do #I'm reading from a big wordlist instructions using $line done Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies

7. UNIX for Dummies Questions & Answers

How to remove fields space and append next line to previous line.?

awk 'BEGIN{FS = "Ç"} NR == 1 {p = $0; next} NF > 1 {print p; p = $0} NF <= 1 {p = (p " " $0)} END {print p}' input.txt > output.txt This is what the input data file looks like with broken lines Code: 29863 Ç890000000 Ç543209911 ÇCHNGOHG Ç000000001 Ç055 ... (4 Replies)
Discussion started by: cumeh1624
4 Replies

8. Shell Programming and Scripting

Need append sequence number

Hi, Need to add sequnce number to one of the csv file and please find below actual requirement. Input file ABC,500 XXQ,700 ADF,400, ART,200 Out put file should be 1,ABC,500 2,XXQ,700 3,ADF,400, 4,ART,200 (3 Replies)
Discussion started by: siva83
3 Replies

9. Shell Programming and Scripting

Append by line number

i want to append line 1 of file1 to the beginning of line1 of file2 and keep existing txt i have tried this sed sed -n '1p' file1 >> file2 but that goes to line 2 example file1 looks like this jump file2 should look like this jump over i would to do this by line number as... (10 Replies)
Discussion started by: bob123
10 Replies

10. Shell Programming and Scripting

Remove new line starting with a numeric value and append it to the previous line

Hi, i have a file with multiple entries. After some tests with sed i managed to get the file output as follows: lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1, 00,2110597,2094790,0,81,529,75649011,56435363, lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 Replies
beagle.GeneralBeagleImpl(3)					     HMSBEAGLE					       beagle.GeneralBeagleImpl(3)

NAME
beagle.GeneralBeagleImpl - SYNOPSIS
Inherits beagle.Beagle. Inherited by beagle.DependencyAwareBeagleImpl, and beagle.FourStateBeagleImpl. Public Member Functions GeneralBeagleImpl (final int tipCount, final int partialsBufferCount, final int compactBufferCount, final int stateCount, final int patternCount, final int eigenBufferCount, final int matrixBufferCount, final int categoryCount, final int scaleBufferCount) void finalize () throws Throwable void setPatternWeights (final double[] patternWeights) void setTipStates (int tipIndex, int[] states) void getTipStates (int tipIndex, int[] states) void setTipPartials (int tipIndex, double[] inPartials) void setPartials (final int bufferIndex, final double[] partials) void getPartials (final int bufferIndex, final int scaleIndex, final double[] partials) void setEigenDecomposition (int eigenIndex, double[] eigenVectors, double[] inverseEigenValues, double[] eigenValues) void setStateFrequencies (final int stateFrequenciesIndex, final double[] stateFrequencies) void setCategoryWeights (final int categoryWeightsIndex, final double[] categoryWeights) void setCategoryRates (double[] categoryRates) void setTransitionMatrix (final int matrixIndex, final double[] inMatrix, final double paddedValue) void getTransitionMatrix (final int matrixIndex, final double[] outMatrix) void updateTransitionMatrices (final int eigenIndex, final int[] probabilityIndices, final int[] firstDerivativeIndices, final int[] secondDervativeIndices, final double[] edgeLengths, final int count) void updatePartials (final int[] operations, final int operationCount, final int cumulativeScaleIndex) void accumulateScaleFactors (int[] scaleIndices, int count, int outScaleIndex) void removeScaleFactors (int[] scaleIndices, int count, int cumulativeScaleIndex) void copyScaleFactors (int destScalingIndex, int srcScalingIndex) void resetScaleFactors (int cumulativeScaleIndex) void calculateRootLogLikelihoods (final int[] bufferIndices, final int[] categoryWeightsIndices, final int[] stateFrequenciesIndices, final int[] cumulativeScaleIndices, final int count, final double[] outSumLogLikelihood) void calculateEdgeLogLikelihoods (final int[] parentBufferIndices, final int[] childBufferIndices, final int[] probabilityIndices, final int[] firstDerivativeIndices, final int[] secondDerivativeIndices, final int[] categoryWeightsIndices, final int[] stateFrequenciesIndices, final int[] cumulativeScaleIndices, final int count, final double[] outSumLogLikelihood, final double[] outSumFirstDerivative, final double[] outSumSecondDerivative) void getSiteLogLikelihoods (final double[] outLogLikelihoods) InstanceDetails getDetails () Static Public Attributes static final boolean DEBUG = false static final boolean SCALING = true static final int SCALING_FACTOR_COUNT = 254 static final int SCALING_FACTOR_OFFSET = 126 Protected Member Functions int updateStatesStates (int bufferIndex1, int matrixIndex1, int bufferIndex2, int matrixIndex2, int bufferIndex3) int updateStatesPartials (int bufferIndex1, int matrixIndex1, int bufferIndex2, int matrixIndex2, int bufferIndex3) int updatePartialsPartials (int bufferIndex1, int matrixIndex1, int bufferIndex2, int matrixIndex2, int bufferIndex3) Protected Attributes final int tipCount final int partialsBufferCount final int compactBufferCount final int stateCount final int patternCount final int eigenBufferCount final int matrixBufferCount final int categoryCount int partialsSize int matrixSize double[][] cMatrices double[][] eigenValues double[][] stateFrequencies double[] categoryRates double[][] categoryWeights double[] patternWeights double[][] partials int[][] scalingFactorCounts int[][] tipStates double[][] matrices double[] scalingFactors double[] logScalingFactors Constructor &; Destructor Documentation beagle.GeneralBeagleImpl.GeneralBeagleImpl (final inttipCount, final intpartialsBufferCount, final intcompactBufferCount, final intstateCount, final intpatternCount, final inteigenBufferCount, final intmatrixBufferCount, final intcategoryCount, final intscaleBufferCount) [inline] Constructor Parameters: stateCount number of states Member Function Documentation void beagle.GeneralBeagleImpl.copyScaleFactors (intdestScalingIndex, intsrcScalingIndex) [inline] Copy scale factors This function copies scale factors from one buffer to another. Parameters: instance Instance number (input) destScalingIndex Destination scaleBuffer (input) srcScalingIndex Source scaleBuffer (input) Implements beagle.Beagle. void beagle.GeneralBeagleImpl.finalize () throws Throwable [inline] Finalize this instance This function finalizes the instance by releasing allocated memory Implements beagle.Beagle. InstanceDetails beagle.GeneralBeagleImpl.getDetails () [inline] Get a details class for this instance Returns: Implements beagle.Beagle. void beagle.GeneralBeagleImpl.resetScaleFactors (intcumulativeScaleIndex) [inline] Reset scalefactors This function resets a cumulative scale buffer. Parameters: cumulativeScaleIndex Index number of cumulative scaleBuffer (input) Implements beagle.Beagle. void beagle.GeneralBeagleImpl.setPatternWeights (final double[]patternWeights) [inline] Set the weights for each pattern Parameters: patternWeights Array containing patternCount weights Implements beagle.Beagle. void beagle.GeneralBeagleImpl.setTipStates (inttipIndex, int[]states) [inline] Sets partials for a tip - these are numbered from 0 and remain constant throughout the run. Parameters: tipIndex the tip index states an array of patternCount state indices void beagle.GeneralBeagleImpl.updatePartials (final int[]operations, final intoperationCount, final intcumulativeScaleIndex) [inline] Operations list is a list of 7-tuple integer indices, with one 7-tuple per operation. Format of 7-tuple operation: {destinationPartials, destinationScaleWrite, destinationScaleRead, child1Partials, child1TransitionMatrix, child2Partials, child2TransitionMatrix} int beagle.GeneralBeagleImpl.updateStatesPartials (intbufferIndex1, intmatrixIndex1, intbufferIndex2, intmatrixIndex2, intbufferIndex3) [inline], [protected] Calculates partial likelihoods at a node when one child has states and one has partials. Reimplemented in beagle.FourStateBeagleImpl. int beagle.GeneralBeagleImpl.updateStatesStates (intbufferIndex1, intmatrixIndex1, intbufferIndex2, intmatrixIndex2, intbufferIndex3) [inline], [protected] Calculates partial likelihoods at a node when both children have states. Returns: the larges absolute exponent Reimplemented in beagle.FourStateBeagleImpl. Author Generated automatically by Doxygen for HMSBEAGLE from the source code. Version 1.0.0 Fri May 25 2012 beagle.GeneralBeagleImpl(3)
All times are GMT -4. The time now is 09:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy