Sponsored Content
Top Forums UNIX for Dummies Questions & Answers "test: argument expected" error Post 302248354 by jseaton on Friday 17th of October 2008 11:16:42 AM
Old 10-17-2008
Actually, ${hora} is correct, ticks (` `) are depreciated.

You could also easily not get that message by using >/dev/null 2>&1

e.g.
if [ ${hora} -le 19 ] >/dev/null 2>&1
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Facing test: argument expected ERROR

Hi All, When i run the below code : v_shortfield = "" if ; then echo "ravi" else echo "kumar" fi i am getting output as : sam.ksh: test: argument expected kumar Why i am getting error test:argument expected and why i am not getting output as "ravi" :confused: (5 Replies)
Discussion started by: rkrgarlapati
5 Replies

2. Shell Programming and Scripting

ERROR-> test: argument expected , what does it mean?

I am trying to compare two integer variables in the if statement, but i am getting this "test:argument expected". What am i missing? Why is the if loop not executing correctly? trunkPCM="100000"; more $FILE |while read line do PCM=`echo $line | awk '{ print $2 }'` ... (4 Replies)
Discussion started by: tan102938
4 Replies

3. Shell Programming and Scripting

error "integer expression expected" when selecting values

dear members, I am having some difficulties with an automation script that I am writing. We have equipments deployed over our network that generate status messages and I was trying an automated method to collect all information. I did a expect script that telnet all devices, logs, asks for... (4 Replies)
Discussion started by: jorlando
4 Replies

4. Shell Programming and Scripting

error "test: [-d: unary operator expected" very confused.

Im trying to check if a series of directory exists and if not create them, and am having issues. All the instances of test return with the error "test: #!/bin/bash location_Parent=~/Documents/sight_of_sound location_IMG=~/Documents/Sight_of_sound/IMG location_AUD=~/Documents/Sight_of_sound/AUD... (4 Replies)
Discussion started by: orionrush
4 Replies

5. Fedora

"integer expression expected" error with drive space monitoring script

Hi guys, I am still kinda new to Linux. Script template I found on the net and adapted for our environment: #!/bin/sh #set -x ADMIN="admin@mydomain.com" ALERT=10 df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output ... (2 Replies)
Discussion started by: wbdevilliers
2 Replies

6. Shell Programming and Scripting

error : test: argument expected

Hello all, I am trying to figure out why i am getting an error while executing the script...altought it seems like its work...but still get the test arguement error...any help would be appericiate...this script basically connects to any oracle db ( just have to pass db name to it)... (4 Replies)
Discussion started by: abdul.irfan2
4 Replies

7. UNIX for Advanced & Expert Users

Error:--test: argument expected--Even though i give an argument.

Hi All, I am running the script VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt result=`cat har1out.mytxt | grep $1' echo $result echo $1 { if then echo pass else echo fail fi (2 Replies)
Discussion started by: harsha85
2 Replies

8. Shell Programming and Scripting

Error- test: argument expected

check_build_info_table() { if then export build_info_table=`sqlplus -s sna/dbmanager <<! set pagesize 0 heading off feedback off SELECT DISTINCT TABLE_NAME FROM ALL_TABLES WHERE OWNER = 'XYZ' AND TABLE_NAME = 'MY_TABLE'; exit !` ... (3 Replies)
Discussion started by: ambarginni
3 Replies

9. UNIX for Dummies Questions & Answers

Test: argument expected error in shell script

Hi, I am trying to write a small script that validates if there exist files that start with a pattern in a given directory. Below is the piece of my script: #!/usr/bin/ksh BTFDIR=/opt/ships/temp if then echo 'found' else echo 'not found' fi When I run this... (2 Replies)
Discussion started by: snvniranjanrao
2 Replies

10. UNIX for Dummies Questions & Answers

What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?

Please can you help me understand the significance of providing arguments under sh -s in > ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh (4 Replies)
Discussion started by: Sree10
4 Replies
MAITREYA_TEXTCLIENT(1)						   User Commands					    MAITREYA_TEXTCLIENT(1)

NAME
maitreya_textclient - list astrological information in text mode SYNOPSIS
maitreya_textclient [--help] [--date <str>] [--location <str>] [--vedic] [--western] [--html] [--year <num>] [--month <num>] [--day <num>] [--eclipses] [--hora] [--ephemeris] [--ephemeris-sunrise] [--ephemeris-ingress] [--ephemeris-lunar] [--ephemeris-kpevents <str>] [--file <str>] [--base-data] [--planet-list] [--vedicplanets] [--westernplanets] [--kp] [--bhavas] [--nakshatras] [--vargas] [--ashtakavarga] [--yogas] [--jaimini] [--astronomical] [--arabic] [--printsummary <num>] [--shadbala] [--dasas <num>] [--dasas-long <num>] [--aspects] [--transits] [--solar-arc] [--directions] [--lunar-arc] [--constant-arc] [--solar] [--uranian] [--uranian-yearlypreview] [--file2 <str>] [--partner-vedic] [--partner-composite] DESCRIPTION
--help show this help message --date=<str> Set UT date YYYY-MM-DD HH:MM:SS --location=<str> Set location "name LL:LL BB:BB ZZ" --vedic Force Vedic mode (instead of default) --western Force western mode (instead of default) --html print output in HTML format (instead of text) --year=<num> set additional year (transit, Solar) --month=<num> set additional month (transit) --day=<num> set additional day (transit) --eclipses Show eclipses --hora Show Hora --ephemeris Show ephemeris --ephemeris-sunrise Show ephemeris sunrise/Tithi --ephemeris-ingress Show ephemeris ingress events --ephemeris-lunar Show ephemeris Lunar events --ephemeris-kpevents=<str> Show ephemeris kp events for Dasa #n --file=<str> Open given file and use data for calculation --base-data Show base data of chart --planet-list List planets (like in main window, using switch for Vedic/western) --vedicplanets Show vedic planets (like in TextView) --westernplanets Show western planets (like in TextView) --kp Show Krishnamurti Paddhati --bhavas Show Bhavas --nakshatras Show Nakshatras --vargas Show Vargas --ashtakavarga Show Ashtakavarga --yogas Show Yogas --jaimini Show Jaimini calculation --astronomical Show astronomical data --arabic Show Arabic parts --printsummary=<num> Show printout summary nb #n (header of PDF output) --shadbala Show Shad Bala --dasas=<num> Show Dasa nb #n (short form) --dasas-long=<num> Show Dasa nb #n (short form) --aspects Show aspects --transits Show transits --solar-arc Show Solar arc --directions Show directions --lunar-arc Show Lunar arc --constant-arc Show constant arc --solar Show Solar (Tajaka) positions --uranian Show Uranian Analysis --uranian-yearlypreview Show yearly preview (Uranian astrology) --file2=<str> Open second file for partner chart --partner-vedic Show Vedic partner analysis --partner-composite Show partner composite chart Usage: maitreya_textclient [--help] [--date <str>] [--location <str>] [--vedic] [--western] [--html] [--year <num>] [--month <num>] [--day <num>] [--eclipses] [--hora] [--ephemeris] [--ephemeris-sunrise] [--ephemeris-ingress] [--ephemeris-lunar] [--ephemeris-kpevents <str>] [--file <str>] [--base-data] [--planet-list] [--vedicplanets] [--westernplanets] [--kp] [--bhavas] [--nakshatras] [--vargas] [--ash- takavarga] [--yogas] [--jaimini] [--astronomical] [--arabic] [--printsummary <num>] [--shadbala] [--dasas <num>] [--dasas-long <num>] [--aspects] [--transits] [--solar-arc] [--directions] [--lunar-arc] [--constant-arc] [--solar] [--uranian] [--uranian-yearlypreview] [--file2 <str>] [--partner-vedic] [--partner-composite] --help show this help message --date=<str> Set UT date YYYY-MM-DD HH:MM:SS --location=<str> Set location "name LL:LL BB:BB ZZ" --vedic Force Vedic mode (instead of default) --western Force western mode (instead of default) --html print output in HTML format (instead of text) --year=<num> set additional year (transit, Solar) --month=<num> set additional month (transit) --day=<num> set additional day (transit) --eclipses Show eclipses --hora Show Hora --ephemeris Show ephemeris --ephemeris-sunrise Show ephemeris sunrise/Tithi --ephemeris-ingress Show ephemeris ingress events --ephemeris-lunar Show ephemeris Lunar events --ephemeris-kpevents=<str> Show ephemeris kp events for Dasa #n --file=<str> Open given file and use data for calculation --base-data Show base data of chart --planet-list List planets (like in main window, using switch for Vedic/western) --vedicplanets Show vedic planets (like in TextView) --westernplanets Show western planets (like in TextView) --kp Show Krishnamurti Paddhati --bhavas Show Bhavas --nakshatras Show Nakshatras --vargas Show Vargas --ashtakavarga Show Ashtakavarga --yogas Show Yogas --jaimini Show Jaimini calculation --astronomical Show astronomical data --arabic Show Arabic parts --printsummary=<num> Show printout summary nb #n (header of PDF output) --shadbala Show Shad Bala --dasas=<num> Show Dasa nb #n (short form) --dasas-long=<num> Show Dasa nb #n (short form) --aspects Show aspects --transits Show transits --solar-arc Show Solar arc --directions Show directions --lunar-arc Show Lunar arc --constant-arc Show constant arc --solar Show Solar (Tajaka) positions --uranian Show Uranian Analysis --uranian-yearlypreview Show yearly preview (Uranian astrology) --file2=<str> Open second file for partner chart --partner-vedic Show Vedic partner analysis --partner-composite Show partner composite chart AUTHOR
Maitreya6 was written by M. Pettau <http://www.saravali.de/contact.html> This manual page was transcribed by Paul Elliott <pelliott@blackpatchpanel.com>, for the Debian project (and may be used by others) from the output of maitreya_textclient --help. maitreya_textclient 6.0.5 October 2011 MAITREYA_TEXTCLIENT(1)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy