Sponsored Content
Full Discussion: [: missing `]'
Top Forums Shell Programming and Scripting [: missing `]' Post 302665333 by arijitsaha on Monday 2nd of July 2012 10:51:27 AM
Old 07-02-2012
[: missing `]'

Hi,

I am getting this error while running the following code.

Code:
i=`awk '{print $2}' test1.txt`
j=`awk '{print $4}' test1.txt`
k=`awk '{print $6}' test1.txt`
if [ $i =="Yes" && $j =="Yes" && $k =0 ]; then
echo "Up."
else 
echo "down"
fi
rm -f test.txt test1.txt

error is this:

Code:
line 12: [: missing `]'

Please suggest.

Moderator's Comments:
Mod Comment Please use code tags next time for your code and data.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

what am I missing?

I have the following portion of a script Check() { echo "\n\nChecking that all constraints are Enabled" echo "..." sleep 2 CHECK_COUNT='sqlplus -s $1 <<-EOSQL4 set feed off pause off pages 0 head off; set linesize 150 echo off; select count(*) from user_constraints where... (4 Replies)
Discussion started by: Zelp
4 Replies

2. HP-UX

missing disk

Hi Everyone I am having hard drive problems with a C3000 Visualize workstation. The machine has two 9.1Gb disks. One dedicated to the OS 11i and the other containing one lvol /space. When I boot up the second disk can be seen in sam but nowhere else, ie cd /space freezes. I fear that on boot... (3 Replies)
Discussion started by: C3000
3 Replies

3. Solaris

missing libsunmath.so.1

Hi, I have an application which requires libsunmath.so.1, however; my os version seems to be missing this file (find from root level did not return anything). Version: SunOS 5.10 where can I get this file? thanks, (1 Reply)
Discussion started by: orahi001
1 Replies

4. UNIX for Dummies Questions & Answers

missing scrollbar

Hi, My tcsh window doesn't have a scrollbar, so I don't get a lot of history! Can you help to get scrollbar? Thanks (3 Replies)
Discussion started by: parisa_3456
3 Replies

5. Linux

library missing

Hi, I am trying migrate webmin application from solaris to linux. But that is not working in Linux. because the library librpcsoc.so has missed in Linux box.. Could you please advice me that how to resolve this issue and also that how to install that library as well. (1 Reply)
Discussion started by: Mani_apr08
1 Replies

6. Shell Programming and Scripting

Need help looking for missing hours.

I have a file that should cover a days worth of stats, at the beginning of each 15 minute report I have a unique header that looks like the below example. The "0000" and "0015" will change in the header line to show which 15 Minute interval the report is covering and of course from day to day the... (7 Replies)
Discussion started by: fsanchez
7 Replies

7. SuSE

How to resolve missing missing dependencies with opensuse 11.3 and 12.3?

Hello, This is a programming question as well as a suse question, so let me know if you think I should post this in programming. I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

8. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies

9. Programming

Missing cout

Heyas Me trying some C.. cout in specific, thats what i remembered: #include <stdio.h> // -- Just the above or with all the below ones, no change #include <stdio_ext.h> #include <stdlib.h> #include <wchar.h> //#include <iostream> // I assume its the same anyway? //#include <iostream.h>... (2 Replies)
Discussion started by: sea
2 Replies
GAPPLETVIEWER(1)                                                        GNU                                                       GAPPLETVIEWER(1)

NAME
gappletviewer - Load and runs an applet SYNOPSIS
appletviewer [OPTION]... URL... appletviewer [OPTION]... -code CODE appletviewer [OPTION]... -plugin INPUT,OUTPUT DESCRIPTION
The appletviewer tool loads and runs an applet. Use the first form to test applets specified by tag. The URL should resolve to an HTML document from which the appletviewer will extract applet tags. The APPLET, EMBED and OBJECT tags are supported. If a given document contains multiple applet tags, all the applets will be loaded, with each applet appearing in its own window. Likewise, when multiple URLs are specified, each applet tag instance is given its own window. If a given document contains no recognized tags the appletviewer does nothing. appletviewer http://www.gnu.org/software/classpath/ Use the second form to test an applet in development. This form allows applet tag attributes to be supplied on the command line. Only one applet may be specified using the -code option. The -code option overrides the URL form -- any URLs specified will be ignored. appletviewer -code Test.class -param datafile,data.txt gcjwebplugin uses the third form to communicate with the appletviewer through named pipes. OPTIONS
URL OPTIONS -debug This option is not yet implemented but is provided for compatibility. -encoding CHARSET Use this option to specify an alternate character encoding for the specified HTML page. APPLET TAG OPTIONS -code CODE Use the -code option to specify the value of the applet tag CODE attribute. -codebase CODEBASE Use the -codebase option to specify the value of the applet tag CODEBASE attribute. -archive ARCHIVE Use the -archive option to specify the value of the applet tag ARCHIVE attribute. -width WIDTH Use the -width option to specify the value of the applet tag WIDTH attribute. -height HEIGHT Use the -height option to specify the value of the applet tag HEIGHT attribute. -param NAME,VALUE Use the -param option to specify values for the NAME and VALUE attributes of an applet PARAM tag. PLUGIN OPTION -plugin INPUT,OUTPUT gcjwebplugin uses the -plugin option to specify the named pipe the appletviewer should use for receiving commands (INPUT) and the one it should use for sending commands to gcjwebplugin (OUTPUT). DEBUGGING OPTION -verbose Use the -verbose option to have the appletviewer print debugging messages. STANDARD OPTIONS -help Use the -help option to have the appletviewer print a usage message, then exit. -version Use the -version option to have the appletviewer print its version, then exit. -JOPTION Use the -J option to pass OPTION to the virtual machine that will run the appletviewer. Unlike other options, there must not be a space between the -J and OPTION. BUGS
SEE ALSO
AUTHOR
0.98 2010-07-05 GAPPLETVIEWER(1)
All times are GMT -4. The time now is 01:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy