Actually, I didn't realize this would make a difference, but I have a parent directory called [myExamples] that contains my scripts (prep) and (run_example).
I have already made subdirectories of [myExamples], and I can run (prep) to copy (run_example) into each subdirectory.
(run_example) has a few lines that look similar to Line 187, plus a lot of other hulababoos...
The problem is to automatically replace Line 187 of (run_example) in each subdirectory, with a different value of $bulksize (see top message)...
Below is a snippet of (prep) -
Last edited by bluesmodular; 05-16-2010 at 03:20 PM..
Hi,
I'm trying following:echo "test line XA24433 test" | sed 's/.*X\(.*\)/X\1/'
XA24433 test While I want the output as: XA24433
I want to grab the words starting with letter X till the next space, this word can be anywhere in the line. (9 Replies)
Hi!
I'm trying to write a regexp but I have no luck...
I have a string like this:
param1=sometext¶m2=hello¶m3=bye
Also, the string can be simply:
param2=hello
I want to return the value of param2: "hello".
How can I do this?
Thanks. (3 Replies)
Hi
I need to get text that are within ""
For example
File:
asdasd "test test2" sadasds asdda asdasd "demo demo2"
Output:
test test2 demo demo2
Any help is good
Thank you (12 Replies)
please consider this:
echo "11111*X*005010X279~ST*270*1111111*005010X279~BHT*0011*11" | sed 's/.*\(005010X(\d)(\d)(\d)*\).*$/\1/'i'm searching for first occurrence of 005010X while leaving rest of characters out.
:confused:
any tips? thnx in advance guys. (7 Replies)
Hi ,
I am learing sed
echo abc 123 def 456 | sed 's|\(*\) \(*\)|\1|'
is returning abc def 456
i was hoping abc def "\1" should only print the occurence of the first pattern
but according to my understanding it is just removing the first occurence of the second pattern... (7 Replies)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Hi all,
I want to get a substring from a string based on given delimiter, for example:
str="foo|bar|baz" with delimiter "|",
I want to get one substring at each time with the order number the substring in the whole string,
given 1 to get "foo",
given 2 to get "bar",
given 3 to get "baz",
I... (2 Replies)
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
I am learning SED and just following the shell scripting book, i have trouble understanding the grep and sed statement,
Question : 1
__________
/opt/oracle/work/antony>cat teledir.txt
jai sharma 25853670
chanchal singhvi 9831545629
anil aggarwal 9830263298
shyam saksena 23217847
lalit... (7 Replies)
Discussion started by: Antony Ankrose
7 Replies
LEARN ABOUT PHP
bcpow
BCPOW(3) 1 BCPOW(3)bcpow - Raise an arbitrary precision number to anotherSYNOPSIS
string bcpow (string $left_operand, string $right_operand, [int $scale])
DESCRIPTION
Raise $left_operand to the power $right_operand.
PARAMETERS
o $left_operand
- The left operand, as a string.
o $right_operand
- The right operand, as a string.
o $
scale -This optional parameter is used to set the number of digits after the decimal place in the result. You can also set the
global default scale for all functions by using bcscale(3).
RETURN VALUES
Returns the result as a string.
EXAMPLES
Example #1
bcpow(3) example
<?php
echo bcpow('4.2', '3', 2); // 74.08
?>
NOTES
Note
bcpow(3) may return a result with fewer digits after the decimal point than the $scale parameter would indicate. This only occurs
when the result doesn't require all of the precision allowed by the $scale. For example:
Example #2
bcpow(3) scale example
<?php
echo bcpow('5', '2', 2); // prints "25", not "25.00"
?>
SEE ALSO bcpowmod(3), bcsqrt(3).
PHP Documentation Group BCPOW(3)