Sponsored Content
Top Forums UNIX for Dummies Questions & Answers using sed to append text to the end of each line Post 82179 by Redg on Monday 29th of August 2005 01:55:44 PM
Old 08-29-2005
Works Great...Thanks for your help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append text at end of the first line in a file

Hi I need to append some text @ end of the first line in a file. like myfile.txt list = a,b,c list.a=some.. I give the arg "d" . now it append at end of first line list=a,b,c,d list.a=some... Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies

2. Shell Programming and Scripting

Sed : identify a pattern and append a word at the end of a line

Hello to all, On aix, I want to identify a term on a line in a file and then add a word at the end of the line identified. I do not want the word to be added when the line contains the symbol "#". I use the following command, but it deletes the term identified then adds the word. #sed... (4 Replies)
Discussion started by: dantares
4 Replies

3. Shell Programming and Scripting

Append text to end of line on all lines

Hi, I've spent some time researching for this but can't seem to find a solution. I have a file like this 1234|Test|20101111|18:00|19:00There will be multiple lines in the file with the same kind of format. For every line I need to make it this 1234|Test|20101111|18:00|19:00||create... (5 Replies)
Discussion started by: giles.cardew
5 Replies

4. Shell Programming and Scripting

append text from file1 to the end of each line in file2

hi; my file2.txt:portname=1;list=10.11;l- portname=2;list=10.12;l- portname=3;list=10.13;l- ... my file1.txt:;"{'sector=%27'}"\&> so; i want to see:portname=1;list=10.11;l-;"{'sector=%27'}"\&> portname=2;list=10.12;l-;"{'sector=%27'}"\&> portname=3;list=10.13;l-;"{'sector=%27'}"\&>... (4 Replies)
Discussion started by: gc_sw
4 Replies

5. Shell Programming and Scripting

Append text to end of every line

I've scoured the internet with mixed results. As an amateur I turn to the great minds here. I have a text file of 80 or so lines. I want to add ".pdf" to the end of each line. (For now that's it) Most of the internet points toward using "sed". I don't know coding but can figure things out... (4 Replies)
Discussion started by: spacebase
4 Replies

6. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

7. Shell Programming and Scripting

Append text to line if begins with pattern1 AND does not end with pattern2

Hello, I'm looking for sed solution to change ... <li>keyword</li> <li>keyword <li>keyword</li> <li>keyword <li>keyword</li> ... to ... <li>keyword</li> <li>keyword</li> <li>keyword</li> <li>keyword</li> <li>keyword</li> ... I.e., if lines beginning with <li> do not end with... (3 Replies)
Discussion started by: pioavi
3 Replies

8. Shell Programming and Scripting

SED and Solaris Append line to the end of File does not work

Hello, I have to add a new line at the end of a File on Solaris-System: I think my script should be right, because I evaluated it to other threads. However the script does not what I am expected it should do. My file might look like this: Line1 Line2 Line3 And my script could... (7 Replies)
Discussion started by: Timo_HR
7 Replies

9. Shell Programming and Scripting

sed - Find a String and append a text end of the Line

Hi, I have a File, which have multiple rows. Like below 123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY 123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY 123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies

10. Shell Programming and Scripting

sed command to append word at end of line

hello Team, I am looking for sed command or script which will append word at end of line. for example. I want to validate particular filesystem with mount |<filesystem name> command. if nodev parameter is not there then it should add in the fstab file with receptive to the filesystem. # mount... (8 Replies)
Discussion started by: ghpradeep
8 Replies
Math(3pm)						User Contributed Perl Documentation						 Math(3pm)

NAME
PDL::Math - extended mathematical operations and special functions SYNOPSIS
use PDL::Math; use PDL::Graphics::TriD; imag3d [SURF2D,bessj0(rvals(zeroes(50,50))/2)]; DESCRIPTION
This module extends PDL with more advanced mathematical functions than provided by standard Perl. All the functions have one input pdl, and one output, unless otherwise stated. Many of the functions are linked from the system maths library or the Cephes maths library (determined when PDL is compiled); a few are implemented entirely in PDL. FUNCTIONS
acos Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. acos does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. asin Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. asin does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. atan Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. atan does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. cosh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. cosh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. sinh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. sinh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. tan Signature: (a(); [o]b()) The usual trigonometric function. Works inplace. tan does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. tanh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. tanh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. ceil Signature: (a(); [o]b()) Round to integer values in floating-point format. Works inplace. ceil does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. floor Signature: (a(); [o]b()) Round to integer values in floating-point format. Works inplace. floor does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. rint Signature: (a(); [o]b()) Round to integer values in floating-point format. rint uses the 'round half to even' rounding method (also known as banker's rounding). Half-integers are rounded to the nearest even number. This avoids a slight statistical bias inherent in always rounding half-integers up or away from zero. If you are looking to round half-integers up (regardless of sign), try "floor($x+0.5)". If you want to round half-integers away from zero, try "floor(abs($x)+0.5)*($x<=>0)". Works inplace. rint does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. pow Signature: (a(); b(); [o]c()) Synonym for `**'. Works inplace. pow does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. acosh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. acosh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. asinh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. asinh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. atanh Signature: (a(); [o]b()) The standard hyperbolic function. Works inplace. atanh does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. erf Signature: (a(); [o]b()) The error function. Works inplace. erf does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. erfc Signature: (a(); [o]b()) The complement of the error function. Works inplace. erfc does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessj0 Signature: (a(); [o]b()) The regular Bessel function of the first kind, J_n Works inplace. bessj0 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessj1 Signature: (a(); [o]b()) The regular Bessel function of the first kind, J_n Works inplace. bessj1 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessy0 Signature: (a(); [o]b()) The regular Bessel function of the second kind, Y_n. Works inplace. bessy0 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessy1 Signature: (a(); [o]b()) The regular Bessel function of the second kind, Y_n. Works inplace. bessy1 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessjn Signature: (a(); int n(); [o]b()) The regular Bessel function of the first kind, J_n . This takes a second int argument which gives the order of the function required. Works inplace. bessjn does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. bessyn Signature: (a(); int n(); [o]b()) The regular Bessel function of the first kind, Y_n . This takes a second int argument which gives the order of the function required. Works inplace. bessyn does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. lgamma Signature: (a(); [o]b(); int[o]s()) log gamma function This returns 2 piddles -- the first set gives the log(gamma) values, while the second set, of integer values, gives the sign of the gamma function. This is useful for determining factorials, amongst other things. lgamma does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. badmask Signature: (a(); b(); [o]c()) Clears all "infs" and "nans" in $a to the corresponding value in $b. badmask can be run with $a inplace: badmask($a->inplace,0); $a->inplace->badmask(0); If bad values are present, these are also cleared. isfinite Signature: (a(); int [o]mask()) Sets $mask true if $a is not a "NaN" or "inf" (either positive or negative). Works inplace. Bad values are treated as "NaN" or "inf". erfi Signature: (a(); [o]b()) The inverse of the error function. Works inplace. erfi does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. ndtri Signature: (a(); [o]b()) The value for which the area under the Gaussian probability density function (integrated from minus infinity) is equal to the argument (cf erfi). Works inplace. ndtri does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. polyroots Signature: (cr(n); ci(n); [o]rr(m); [o]ri(m)) Complex roots of a complex polynomial, given coefficients in order of decreasing powers. ($rr, $ri) = polyroots($cr, $ci); polyroots does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. BUGS
Hasn't been tested on all platforms to ensure Cephes versions are picked up automatically and used correctly. AUTHOR
Copyright (C) R.J.R. Williams 1997 (rjrw@ast.leeds.ac.uk), Karl Glazebrook (kgb@aaoepp.aao.gov.au) and Tuomas J. Lukka (Tuomas.Lukka@helsinki.fi). Portions (C) Craig DeForest 2002 (deforest@boulder.swri.edu). All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the PDL copyright notice should be included in the file. perl v5.14.2 2012-05-30 Math(3pm)
All times are GMT -4. The time now is 12:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy