Sponsored Content
Top Forums Shell Programming and Scripting problem, with if condition in function Post 302188941 by era on Thursday 24th of April 2008 02:57:58 PM
Old 04-24-2008
You are specifying the boundary character incorrectly. Observe:

Code:
vnix$ variant=ick
vnix$ echo \b"$variant"\b
bickb
vnix$ echo "\b$variant\b"
\bick\b
vnix$ echo "\\b$variant\\b"
\bick\b

Only the last one is correct and portable; the middle one might or might not blow up in your face.

We should really have a quoting FAQ here in the forums. In the meantime, read UNIX Shell Quote

Though, if you are running awk on the file anyway, why don't you put this logic in the awk script, too?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem with if condition

hi, :) pls consider the following if statement if //g') ] then ........ else ....... when i execute the script i am getting the following error '(' unexpected I am not able to find the mistake. could anybody tell where i did mistake. cheers RRK (13 Replies)
Discussion started by: ravi raj kumar
13 Replies

2. Shell Programming and Scripting

problem in if condition

hi, actully i need the belp for the below. host_list=" Host1 host2 host3 host4 " n=`hostname` i need to put the condition like the below if n is among the host mention in the host_list if then #some stugg else # some other stuff fi (1 Reply)
Discussion started by: mail2sant
1 Replies

3. Shell Programming and Scripting

race condition with wait() function

Hi, I'm currently writing a bash script, that starts multiple threads: ____________________ #!/bin/bash loop=0 while((loop!=10)) do thread & ((loop++)) done #wait for all sub-processes (thread) to finish wait ___________________ Now I want to know, what happens, if a... (2 Replies)
Discussion started by: tho99
2 Replies

4. Shell Programming and Scripting

problem in if then else condition

Hi , I am trying the following simple script . But it is always giving 1 output. Dont know why #!/bin/sh find . -name "a.log" if ; then echo "1" else echo "0" fi Kindly advice. it is giving 1 output even when the a.log file is not there (26 Replies)
Discussion started by: himvat
26 Replies

5. Programming

performance issues of calling a function in if condition

Hi, I have written a program in C and have to test the return value of the functions. So the normal way of doin this wud b int rc rc=myfunction(input); if(rc=TRUE){ } else{ } But instead of doing this I have called the function in the if() condition. Does this have any... (2 Replies)
Discussion started by: sidmania
2 Replies

6. Shell Programming and Scripting

problem with if condition

Hi, I'm writing a bash script and i have a condition that goes if then break fi but, when i go to run it, i come across this line 10: ' where line 10 is the if I don't know what's going on :( (2 Replies)
Discussion started by: channyboy
2 Replies

7. Shell Programming and Scripting

if condition problem!

Hi All, I'm a newbie here, I'm just wondering how can i disable my 1st sed command if there's no file found on Yes_Directory and process instead the No_Directory because there's a file found on it. Yes_Directory="/home/yes/ No_Directory="home/no/ script: if ; then sed -i... (8 Replies)
Discussion started by: nikki1200
8 Replies

8. Shell Programming and Scripting

Function into a condition ?

Hello, How can i put a function into a condition ? g1 is my function I tested this in vain if g1 $1 $2 $3 -ne 0 ];thenif ;then Thanks for yours suggestions (18 Replies)
Discussion started by: amazigh42
18 Replies

9. Shell Programming and Scripting

If condition problem

Hi All, I am using below if condition to check whether null is passed as a parameter to the program if or ; then echo "ABC">>$FILE else echo "CDF">>$FILE fi However it is saying me null=null command not found . Please help me with this (9 Replies)
Discussion started by: Hypesslearner
9 Replies
Finance::Quote::Fidelity(3)				User Contributed Perl Documentation			       Finance::Quote::Fidelity(3)

NAME
Finance::Quote::Fidelity - Obtain information from Fidelity Investments. NOTE NOTE NOTE NOTE NOTE
This module is currently non-functional. SYNOPSIS
use Finance::Quote; $q = Finance::Quote->new; %info = Finance::Quote->fetch("fidelity","FBGRX"); %info = Finance::Quote->fetch("fidelity_direct","FBGRX"); DESCRIPTION
This module obtains information from Fidelity Investments, http://www.fidelity.com/. This module is loaded by default on the Finance::Quote object. It is also possible to load this module explicitly by passing "Fidelity" as one of Finance::Quote->new()'s parameters. The "fidelity" fetch method may make use of failover modules. The "fidelity_direct" method will only obtain information directly from Fidelity. Information returned by this module is governed by Fidelity Investment's terms and conditions. LABELS RETURNED
The following labels may be returned by Finance::Quote::Fidelity: exchange, name, number, nav, change, ask, date, yield, price. SEE ALSO
Fidelity Investments, http://www.fidelity.com/ Finance::Quote::Yahoo::USA; perl v5.12.1 2009-10-05 Finance::Quote::Fidelity(3)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy