?
Solved

Very Simple BASH Question with Conditional Expressions

Posted on 2005-03-23
1
Medium Priority
?
217 Views
Last Modified: 2010-04-21
I just want to do a logical OR.
This line gives me errors:

if [ ("$v" != "") || ("$c" != "") ]; then

I get this error:
./dcmget: line 71: syntax error near unexpected token `"$v"'
./dcmget: line 71: `        if [ ("$v" != "") || ("$c" != "") ]; then'

I have tried a few variations but nothing seems to work.

0
Comment
Question by:dignified
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 200 total points
ID: 13616228
Try this:

if [[ "$v" != "" || "$c" != "" ]]; then



0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question