Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Replace variable string with text Post 302951627 by RudiC on Saturday 8th of August 2015 07:12:35 AM
Old 08-08-2015
If we are dealing only with 10 digit numbers lead by "078", that will work. If not, we need to know more to identify the digits to be replaced, like "the first angle bracketed number in the resp. line", or "the number following the 'start call' string"
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find and replace text with a variable?

Is there a way that I can make the following work with using variables? perl -pi -e 's#blah#hrm#ig' replacetext but like this var=blah perl -pi -e 's#$var#hrm#ig' replacetext (3 Replies)
Discussion started by: doublejz
3 Replies

2. UNIX for Dummies Questions & Answers

sed to replace text with a variable

I'm trying to replace text in a file with text from a variable I have the following in my script, but its not working: #!/bin/ksh echo "Enter the path to load scripts" read x echo "updating the templates" sed "s/CHANGE_ME_TO_LOAD_PATH/"$x"/g" LoadFiles.sh > LoadFiles2.sh I thought... (1 Reply)
Discussion started by: orahi001
1 Replies

3. Shell Programming and Scripting

Replace string in a file w/ a variable value

I am trying to replace the default home page for several mac user accounts, I wrote a script that will hunt the files down and replace them with a pre-configured set. The problem I am having is that the download destination path for the browser is hard coded into a .plist (text config file) file... (5 Replies)
Discussion started by: tret
5 Replies

4. Shell Programming and Scripting

Using sed to replace a string in file with a string in a variable that contains spaces

Hi, i call my shell like: my_shell "my project name" my script: #!/bin/bash -vx projectname=$1 sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp cp temp test_config_doxy the following error occurres: sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies

5. AIX

Replace string with asterisk(*) in variable

I was trying to replace a string ( for eg - @@asterisk@@ to * ) in variable using cat $INFILE | while read LINE do stmt1=`echo $LINE | sed 's/@@asterisk@@/\*/g'` stmt=$stmt' '$stmt1 stmt2=`echo $LINE` STATEMENT=$STATEMENT' '$stmt2 done echo 'Statement with sed -- > '... (5 Replies)
Discussion started by: Vaddadi
5 Replies

6. Shell Programming and Scripting

replace text in file using variable

Hi, I'm making a script that automaticaly set file size and path in xml file. I tried with : sed -i 's/BOOTPATH/TEST/g' file.xml it works fine but if I use a viriable : sed -i 's/BOOTPATH/$bootpathf/g' file.xml with this one, no change are made. I don't understand why. If a make a ... (13 Replies)
Discussion started by: Toug
13 Replies

7. Shell Programming and Scripting

Replace string in file with a variable value

Hi Fellows, I am new to shell, please help we me out in this.. i have file which some lines like this.. $$param1='12-jan-2011' $$param2='14-jan-2011' $$param3='30-jan-2011' . . .....so on.. I want to change $$param3 to '31-dec-2011'. i have variable which is storing(30-jan-2011 this... (1 Reply)
Discussion started by: victor369
1 Replies

8. Shell Programming and Scripting

replace (sed?) a string in file with multiple lines (string) from variable

Can someone tell me how I can do this? e.g: a=$(echo -e wert trewt ertert ertert ertert erttert erterte rterter tertertert ert) How do i replace the STRING with $a? I try this: sed -i 's/STRING/'"$a"'/g' filename.ext but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies

9. Shell Programming and Scripting

Replace substring from a string variable

Hi, Wish to remove "DR-" from the string variable (var). var="DR-SERVER1" var=`echo $var | sed -e 's/DR-//g'` echo "$var" Expected Output: However, I get the below error: Can you please suggest. (4 Replies)
Discussion started by: mohtashims
4 Replies

10. Shell Programming and Scripting

How to replace string in variable?

Hello, I have simple while and for loops in a shell script and I would like to replace some characters in COL2 when I run it. I am on ubuntu 14.04 while read COL1 COL2 COL3 COL4 do name=$COL2 #cat $name | sed -i "s|_| |g" $name for i in $COL3 $COL4 do some codes ...... run $i b="$name"... (11 Replies)
Discussion started by: baris35
11 Replies
CACOSH(3)						   BSD Library Functions Manual 						 CACOSH(3)

NAME
cacosh -- complex inverse hyperbolic cosine function SYNOPSIS
double complex cacosh(double complex z); long double complex cacoshl(long double complex z); float complex cacoshf(float complex z); DESCRIPTION
cacosh(z) computes the inverse hyperbolic cosine of the complex floating-point number z, with a branch cut on the interval [-inf, 1] along the real axis. cacosh() returns values in a half-strip of the complex plane with positive real part and imaginary part in the interval [-Pi, Pi]. For all complex floating point numbers z, cacosh(conj(z)) = conj(cacosh(z)). SPECIAL VALUES
The conjugate symmetry of cacosh() is used to abbreviate the specification of special values. cacosh(+-0 + 0i) returns 0 + Pi/2 i. cacosh(x + inf i) returns inf + Pi/2 i, for finite x. cacosh(x + NaN i) returns NaN + NaN i, for finite nonzero x. cacosh(-inf + yi) returns inf + Pi i, for finite positive-signed y. cacosh(inf + yi) returns inf + 0i, for finite positive-signed y. cacosh(-inf + inf i) returns inf + 3Pi/4 i. cacosh(inf + inf i) returns inf + Pi/4 i. cacosh(+-inf + NaN i) returns inf + NaN i. cacosh(NaN + yi) returns NaN + NaN i, for finite y. cacosh(NaN + inf i) returns inf + NaN i. cacosh(NaN + NaN i) returns NaN + NaN i. NOTES
SEE ALSO
ccosh(3) complex(3) STANDARDS
The cacosh() function conforms to ISO/IEC 9899:2011. 4th Berkeley Distribution December 11, 2006 4th Berkeley Distribution
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy