Sponsored Content
Full Discussion: UNIX variable issue
Top Forums Shell Programming and Scripting UNIX variable issue Post 302334910 by TonyFullerMalv on Thursday 16th of July 2009 08:23:42 PM
Old 07-16-2009
The $remotePath and $fileName variables are not set in your environment on the machine 190.2.332.234 so they end up as "/".
Try changing the line to using " speech marks so the variables get changed at the local end, e.g.:
Code:
EXIST=`ssh batch@190.2.332.234 "if [ -f $remotePath/$fileName ]; then echo 0; else echo 1 ; fi"`

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed variable issue

I'm writting a krn shell script and i'm having an issue with a variable using sed. If someone enters a variable with a " /" the sed command doesn't read it right. example. a='12000/10-DC' b='12000/10-AC' cat file | sed "s/$a/$b/" How can i correct this issue? Will the fix to this... (2 Replies)
Discussion started by: wisher115
2 Replies

2. Solaris

Variable Substitution Issue

#!/bin/ksh VAR_ONE=HELLO TEMP=ONE echo $VAR_${TEMP} ## Output is: ONE Hi, I want the output to echo HELLO and not ONE as the above script does. I know I am missing something with dollar substitution. Can anyone help me out ? Thanks. Cal (4 Replies)
Discussion started by: calredd
4 Replies

3. Shell Programming and Scripting

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

4. Programming

Have issue with variable

Hi All, i am new to unix.. i have an issue with my unix script...let me explain the task that i want to make script.... i prepared script which will connect data base from my linux box using sqlplus cmd... however in that i want to use the variable like below.. select * from... (0 Replies)
Discussion started by: Shahul
0 Replies

5. Shell Programming and Scripting

Variable sub-menu issue

The code im having problems with is highlighted in red, upon selecting option 2 on the main menu (highlighted green) my echo "NETWORK CONNECTIVITY" command seems to get overlooked and the resulting output is "Thank you for using the Operator Administrative Tool." being displayed. Can anyone tell me... (2 Replies)
Discussion started by: warlock129
2 Replies

6. Shell Programming and Scripting

variable issue

Hi, I'm sure that it's a very simple issue. this is a part of my code : while read ligne do result=`ls -R ../FILES/|grep "."$ligne"$"` echo $result done<TYPE_EXT_FILES.txt the echo return nothing (as my variable is empty). I'm sure that the problem... (10 Replies)
Discussion started by: skubann
10 Replies

7. UNIX for Dummies Questions & Answers

PLease HELP!!! PATH variable issue

Hello, I logged in to the unix solaris with my user name and then I again logged in with the sudo bash -l command now when I do echo $PATH It shows me => /usr/bin:/usr/local/bin:/usr/bin/usr/sbin:/usr/ucb:/usr/local/bin How do i find out where is this file located for setting the... (3 Replies)
Discussion started by: siddhans
3 Replies

8. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

9. UNIX for Dummies Questions & Answers

Variable usage issue

Hi, I need a help in setting scope of the variable. I want to use the below logic right before the "break" statement if ; then echo $header echo $trailer fi But due the scope of the variable it is causing issues. I tried using "export" statement. But it changes the output completely ... (0 Replies)
Discussion started by: Prem148
0 Replies

10. UNIX for Dummies Questions & Answers

Issue with variable assignation

Hi All, My files(.csv) are created in download path. All the files files are having footer with count of rows or may be blank. When i am trying to put this below code in shell script and run it, the row_num is not getting assigned, but works correctly on command prompt. I am trying to put this... (2 Replies)
Discussion started by: abhi_123
2 Replies
NUMFMT_PARSE_CURRENCY(3)						 1						  NUMFMT_PARSE_CURRENCY(3)

NumberFormatter::parseCurrency - Parse a currency number

	Object oriented style

SYNOPSIS
public float NumberFormatter::parseCurrency (string $value, string &$currency, [int &$position]) DESCRIPTION
Procedural style float numfmt_parse_currency (NumberFormatter $fmt, string $value, string &$currency, [int &$position]) Parse a string into a double and a currency using the current formatter. PARAMETERS
o $fmt -NumberFormatter object. o $currency - Parameter to receive the currency name (3-letter ISO 4217 currency code). o $position - Offset in the string at which to begin parsing. On return, this value will hold the offset at which parsing ended. RETURN VALUES
The parsed numeric value or FALSE on error. EXAMPLES
Example #1 numfmt_parse_currency(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY ); $num = "1.234.567,89xc2xa0$"; echo "We have ".numfmt_parse_currency($fmt, $num, $curr)." in $curr "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY ); $num = "1.234.567,89xc2xa0$"; echo "We have ".$fmt->parseCurrency($num, $curr)." in $curr "; ?> The above example will output: We have 1234567.89 in USD SEE ALSO
numfmt_get_error_code(3), numfmt_parse(3), numfmt_format_currency(3). PHP Documentation Group NUMFMT_PARSE_CURRENCY(3)
All times are GMT -4. The time now is 10:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy