Sponsored Content
Top Forums Shell Programming and Scripting error "integer expression expected" when selecting values Post 302266465 by jorlando on Wednesday 10th of December 2008 09:09:52 AM
Old 12-10-2008
The lines of /var/www/cgi-bin/modems_failed are the excerpt collected by expect.

In that case, the device name is device1, so my script would select the line with failed modems Number of failed/non-existent modems: 10 and select the value 10

the output file would have a line written with device1 10
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

integer expression expected error

I'm a beginner so I might make beginner mistakes. I want to count the "#define" directives in every .C file I get the following errors: ./lab1.sh: line 5: ndef: command not found ./lab1.sh: line 6: #!/bin/sh for x in *. do ndef = 'grep -c \#define $x' if ; then ... (2 Replies)
Discussion started by: dark_knight
2 Replies

2. Shell Programming and Scripting

integer expression expected error crontab only

I created a bash script that ran fine for awhile on a nightly crontab but then started crashing with commands not found, so I added PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/home/homedir/scripts/myscriptdir export PATH and now I don't get those errors, but... (2 Replies)
Discussion started by: unclecameron
2 Replies

3. 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

4. Shell Programming and Scripting

Display Error [: : integer expression expected

i have lunix 5.4 i make script to tack the export from database 11g by oracle user the oracle sheel is /bin/bash when run this script display this error ./daily_xport_prod: line 36: the daily_xport_prod script #! /bin/sh # ORACLE_HOME=/u01/appl/oracle/product/11.2.0/db_1 export... (8 Replies)
Discussion started by: m_salah
8 Replies

5. Shell Programming and Scripting

cshell integer expression from "0000" to "1999"

I have 2000 files named like "file-fr0000.log", "file-fr1999.log"... I wanna generate the file names automatically in the following c shell script: set fr = 0 while ($fr <= 1999) grep "ENERGY" file-fr$fr.log > data.dat @ fr = ( $fr + 1 ) end The above will generate file names... (3 Replies)
Discussion started by: rockytodd
3 Replies

6. Shell Programming and Scripting

if script error: integer expression expected

Hi, i am making a simple program with a optional -t as the 3rd parameter. Submit course assignment -t dir In the script, i wrote: #!/bin/bash echo "this is course: ${1}" echo "this is assignment #: ${2}" echo "late? : ${3}" if then echo "this is late" fi but this gives me a :... (3 Replies)
Discussion started by: leonmerc
3 Replies

7. Shell Programming and Scripting

Error: integer expression expected

root@server01 # df -h | grep /tmp | awk {'print $3}' 252M root@server01 # root@server01 # cat /usr/local/tmpchk.sh #!/bin/sh x=`df -h | grep /tmp | awk {'print $3}'` if ; then rm -fr /tmp/somefolder/ else echo "its small" (2 Replies)
Discussion started by: fed.linuxgossip
2 Replies

8. UNIX for Dummies Questions & Answers

Integer expression expected error in script

When i run the following code i get an error that says Integer expression expected! How do i fix this? #!/bin/bash if ;then echo "wrong" exit 1 fi if ;then for i in /dev;do if ;then echo $i ls -l fi (4 Replies)
Discussion started by: kotsos13
4 Replies

9. UNIX for Dummies Questions & Answers

redirect for "[: : integer expression expected" error

Hi, I read in this forum that for "https://www.unix.com/shell-programming-scripting/156008-integer-expression-expected-regular-expression.html thanks! (7 Replies)
Discussion started by: Vijay81
7 Replies

10. Shell Programming and Scripting

if condition error: integer expression expected

I am trying to run following condition with both variables having numeric values "1,2,3" if ;when i run it i get following error: $NEW_STATE: integer expression expected Please correct me where I'm doing wrong. I'm trying to check either New State is greater or Old state.... (0 Replies)
Discussion started by: kashif.live
0 Replies
vgetty(8)							   vgetty manual							 vgetty(8)

NAME
vgetty - voice extension to the mgetty+sendfax program SYNOPSIS
vgetty [options] ttydevice vgetty is not meant to be run from the command line. It should be run from the /etc/inittab file so it can respawn after each call. Here is a typical inittab entry: S0:345:respawn:/usr/local/sbin/vgetty ttyS0 If you already have a line in your inittab file which invokes mgetty, replace it with vgetty, since it replaces/extends its functionality. DESCRIPTION
vgetty is an extension to the mgetty+sendfax program which provides an interface to voice-capable modems. Use it to operate your modem as a simple answering machine or build your own sophisticated voice messaging system. vgetty handles all the voice-modem specific protocols, giving application programs a uniform, modem-independent voice library. Supported modems include many common serial modems from 3com/USRobotics, Elsa, Multitech, ZyXEL, and others. Caller ID and Distinctive Ring are supported provided you have subscribed to these services from your phone company. Software-based modems (winmodems) are not supported. vgetty comes with tools to convert au/wav/voc sound files to/from the format used by most supported modems. Basic editing and filtering of sound files is included as well. See pvf(1) for more information. OPTIONS
vgetty accepts the same options as mgetty. The one's relevant to voice mode are given here. See mgetty(8) for other options related to data and fax modes. -a Use autobauding (change port speed to modem CONNECT speed). There is no voice modem that needs this, the option is just documented for completeness. -m 'expect send ...' Set the chat sequence that is used to initialize the modem. For an empty expect part, use empty double quotes (""). Since the sequence contains spaces, you will have to enclose all of it in single quotes (''). Example: vgetty -m '"" ATH0 OK' -n <rings> Set the number of rings after which vgetty will answer the phone -s <speed> Set the serial port speed to use, e.g. "-s 38400". This is the speed of communication between the computer and modem in bits/sec (baud). -x <log level> Set the log verbosity level. Zero (0) means no logging, six (6) is really noisy. Use level six (6) when sending problem reports to the maintainer. The log file is /var/log/vgetty.ttyXX. ENVIRONMENT
vgetty sets the following environment variables when calling external programs: CALLER_ID The caller's telephone number. CALLED_ID The number the caller has dialed. Useful for ISDN with multiple incoming phone numbers on the same physical line. CONNECT The connect string as reported by the modem (e.g. "38400/V.32bis/V.42bis ... ", etc.). DEVICE The tty device being used (e.g. "ttyS0"). Useful for handling multiple devices ("messages on this line are for work, messages on the other line are personal"). RESOURCES
vgetty is included in the mgetty+sendfax distribution. For the latest release, go to: ftp://alpha.greenie.net/mgetty/source The vgetty maintainer's home page is at: http://www-internal.alphanet.ch/~schaefer/vgetty.html Send problem reports to: vgetty-maintainer@alphanet.ch For information on mgetty, go to: http://alpha.greenie.net/mgetty The mgetty mailing list is at mgetty@muc.de. The mailing list is mirrored to the de.alt.comm.mgetty newsgroup. FILES
/etc/mgetty+sendfax/voice.conf Main configuration file for vgetty. Many options here override the equivalents found in /etc/mgetty+sendfax/mgetty.config /etc/nologin.ttyXX If this file exists, vgetty will not answer calls on device ttyXX. /var/log/vgetty.ttyXX Debug log file for vgetty. /var/spool/voice/messages/Index List of greeting messages to use. /var/spool/voice/.code Access code for remote playback of messages using the dtmf.sh script /var/spool/voice/.flag vgetty touches this file when a new message is received /var/spool/voice/.timestamp Used by the dtmf.sh script to record last time of message playback DIAGNOSTICS
If vgetty doesn't work they way you think it should, check the log file. By default, it is located in /var/log/vgetty.ttyXX (for the vgetty process handling device ttyXX, e.g. ttyS0). BUGS
vgetty supports most standard voice modems, but many modems are not fully compliant with relevant standards or contain firmware bugs. If you have problems, try upgrading your modem to the latest firmware revision. If you discover a bug with how vgetty reacts to your modem, please email the maintainer (vgetty-maintainer@alphanet.ch) describing your problem. Include relevant excerpts from the log file (set log level to six first), and details about your modem (including firmware revision) and operating system. SEE ALSO
mgetty(8), pvf(1) COPYRIGHT
vgetty is Copyright (c) 1997-2001 Marc Schaefer (schaefer@alphanet.ch) and many others, before and after. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This man page was written by Barry Stewart <bstewart@smyrnacable.net>, and has CVS version: $Id: vgetty.8,v 1.1 2001/12/22 18:43:22 marcs Exp $ version 0.60 $Date: 2001/12/22 18:43:22 $ vgetty(8)
All times are GMT -4. The time now is 03:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy