04-23-2010
Quote:
Originally Posted by
methyl
@scottn
in general Korn Shell is not a POSIX shell but I believe that ksh93 is one.
I find the various inconsistent implementations of POSIX "standards" over the years tiresome and prefer ksh88 syntax for cross-platform portability. This includes using "cat" where necessary.
What O/S do you have where "test -e" works in ksh?
Hi Methyl.
AIX and Solaris 8 (it doesn't get much more ksh88 than on Solaris 8!)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Dummies Questions & Answers
Hi all,
I am getting "test:argument expected" error in the following script
LOGDIR=$XXAR_TOP/log
PROGRAM_NAME=XXAR_GPS_LBFDMSGEN
..
..
..
Check_Errors()
{
sqllogfile=$1
cd ${LOGDIR}
countfile=${LOGDIR}/${PROGRAM_NAME}.tmp
echo "countfile is " $countfile >> $LOGFILE
echo... (4 Replies)
Discussion started by: rrs
4 Replies
3. Shell Programming and Scripting
Can someone help me with a very simple query
I have the following script:
#!/bin/sh
VAR1=""
if
then
VAR1="Message"
fi
echo $VAR1
put when i run it i get the following error
test_job.sh: test: argument expected (5 Replies)
Discussion started by: andy202
5 Replies
4. Shell Programming and Scripting
I'm newbie to coding script so i found test: argument expected when i run it. please help me
a=`df -k |awk '{print $5 }'|egrep "(100%|%)"|cut -d"%" -f1|tail -1`
if
then
df -k|egrep "(100%|%)"|awk '{print $1,$5,$6}'
else
echo "No disk capacity more than 80%"
fi
thk in advance (7 Replies)
Discussion started by: unitipon
7 Replies
5. Shell Programming and Scripting
+
test.sh: test: argument expected
#!/bin/bash
if
then
echo thennnn
else
echo elseeee
fi
why does it show this error? Clearly from debug mode, the argument is passed. I also tried if
Run on Solaris 9.
Thanks (10 Replies)
Discussion started by: lalelle
10 Replies
6. Shell Programming and Scripting
Hi,
Since i am new to Unix and on suggestion on some smart guys on unix... i have decide to learn more deeply on Unix...so i was kind of playing with if statements and found this error... though i tried to correct is for hours now i couldnt find whats wrong in my loop.
if
then
... (4 Replies)
Discussion started by: bhagya2340
4 Replies
7. Shell Programming and Scripting
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
8. UNIX for Advanced & Expert Users
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
The following example prompts are passed into the shell script.
$1 = /tmp/dir/
$2 = varies (test.txt, test1.txt, test2.txt...)
$3 = test_YYYYMMDD.txt
---------------------------------------------------------------------------
#!/bin/sh
cd $1
if ; then
if ; then
... (3 Replies)
Discussion started by: smkremer
3 Replies
LEARN ABOUT DEBIAN
gnome2::canvas::richtext
Gnome2::Canvas::RichText(3pm) User Contributed Perl Documentation Gnome2::Canvas::RichText(3pm)
NAME
Gnome2::Canvas::RichText - Rich text canvas item
HIERARCHY
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gnome2::Canvas::Item
+----Gnome2::Canvas::RichText
METHODS
textbuffer = $text->get_buffer
$text->set_buffer ($buffer)
o $buffer (Gtk2::TextBuffer)
$text->copy_clipboard
$text->cut_clipboard
textiter = $text->get_iter_at_location ($x, $y)
o $x (integer)
o $y (integer)
rectangle = $text->get_iter_location ($iter)
o $iter (Gtk2::TextIter)
$text->paste_clipboard
PROPERTIES
'anchor' (Gtk2::AnchorType : default "north-west" : readable / writable)
Anchor point for text
'cursor-blink' (boolean : default true : readable / writable)
Does the cursor blink in this rich text item?
'cursor-visible' (boolean : default true : readable / writable)
Is the cursor visible in this rich text item?
'direction' (Gtk2::DirectionType : default "tab-backward" : readable / writable)
Text direction
'editable' (boolean : default true : readable / writable)
Is this rich text item editable?
'grow-height' (boolean : default false : readable / writable)
Should the text box height grow if the text does not fit?
'height' (double : default 0 : readable / writable)
Height for text box
'indent' (integer : default 0 : readable / writable)
Number of pixels for indentation
'justification' (Gtk2::Justification : default "left" : readable / writable)
Justification mode
'left-margin' (integer : default 0 : readable / writable)
Number of pixels in the left margin
'pixels-above-lines' (integer : default 0 : readable / writable)
Number of pixels to put above lines
'pixels-below-lines' (integer : default 0 : readable / writable)
Number of pixels to put below lines
'pixels-inside-wrap' (integer : default 0 : readable / writable)
Number of pixels to put inside the wrap
'right-margin' (integer : default 0 : readable / writable)
Number of pixels in the right margin
'text' (string : default undef : readable / writable)
Text to display
'visible' (boolean : default true : readable / writable)
Is this rich text item visible?
'width' (double : default 0 : readable / writable)
Width for text box
'wrap-mode' (Gtk2::WrapMode : default "word" : readable / writable)
Wrap mode for multiline text
'x' (double : default 0 : readable / writable)
X position
'y' (double : default 0 : readable / writable)
Y position
SIGNALS
tag-changed (Gnome2::Canvas::RichText, Glib::Object)
ENUMS AND FLAGS
enum Gtk2::AnchorType
o 'center' / 'GTK_ANCHOR_CENTER'
o 'north' / 'GTK_ANCHOR_NORTH'
o 'north-west' / 'GTK_ANCHOR_NORTH_WEST'
o 'north-east' / 'GTK_ANCHOR_NORTH_EAST'
o 'south' / 'GTK_ANCHOR_SOUTH'
o 'south-west' / 'GTK_ANCHOR_SOUTH_WEST'
o 'south-east' / 'GTK_ANCHOR_SOUTH_EAST'
o 'west' / 'GTK_ANCHOR_WEST'
o 'east' / 'GTK_ANCHOR_EAST'
o 'n' / 'GTK_ANCHOR_N'
o 'nw' / 'GTK_ANCHOR_NW'
o 'ne' / 'GTK_ANCHOR_NE'
o 's' / 'GTK_ANCHOR_S'
o 'sw' / 'GTK_ANCHOR_SW'
o 'se' / 'GTK_ANCHOR_SE'
o 'w' / 'GTK_ANCHOR_W'
o 'e' / 'GTK_ANCHOR_E'
enum Gtk2::DirectionType
o 'tab-forward' / 'GTK_DIR_TAB_FORWARD'
o 'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
o 'up' / 'GTK_DIR_UP'
o 'down' / 'GTK_DIR_DOWN'
o 'left' / 'GTK_DIR_LEFT'
o 'right' / 'GTK_DIR_RIGHT'
enum Gtk2::Justification
o 'left' / 'GTK_JUSTIFY_LEFT'
o 'right' / 'GTK_JUSTIFY_RIGHT'
o 'center' / 'GTK_JUSTIFY_CENTER'
o 'fill' / 'GTK_JUSTIFY_FILL'
enum Gtk2::WrapMode
o 'none' / 'GTK_WRAP_NONE'
o 'char' / 'GTK_WRAP_CHAR'
o 'word' / 'GTK_WRAP_WORD'
o 'word-char' / 'GTK_WRAP_WORD_CHAR'
SEE ALSO
Gnome2::Canvas, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gnome2::Canvas::Item
COPYRIGHT
Copyright (C) 2003-2004 by the Gtk2-Perl Team.
This software is licensed under the LGPL; see Gnome2::Canvas for a full notice.
perl v5.14.2 2011-11-16 Gnome2::Canvas::RichText(3pm)