Sponsored Content
Full Discussion: Epic - Validate input size
Top Forums Shell Programming and Scripting Epic - Validate input size Post 302730741 by Yoda on Tuesday 13th of November 2012 02:47:50 PM
Old 11-13-2012
Code:
read mobile

if [[ "$mobile" != +([0-9]) ]]
then
        # Not numeric
else
        # Is numeric
fi

if [[ ${#mobile} -eq 10 ]]
then
      # Is 10 digits
else
      # Not 10 digits
fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to validate input values

Hi How would i validate value of a variable whether it is number,date or string Thanks in advance Sas (5 Replies)
Discussion started by: SasDutta
5 Replies

2. Solaris

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

3. Shell Programming and Scripting

validate input

the user inputs names that have to be inside square brackets I want to check if the user puts the brackets and if not ask him to re-enter the names (9 Replies)
Discussion started by: DDoS
9 Replies

4. UNIX for Dummies Questions & Answers

BASH validate user input

Hey, im trying to validate a user input and need some help. The input needs to be just a single letter. Im using a case to so this eg: read answer case $answer in *) echo "OK" ;; *) echo "This is a number" read answer ;; *) echo... (2 Replies)
Discussion started by: 602chrislys
2 Replies

5. Shell Programming and Scripting

Validate and sort input

Hi, This will most likely be a simple answer. Currently I have a situation where my script will be sent various options: -o1 -o2 -oe3@somthing.com Now, if I want to run a certain command based on the option I am sent, I am doing the following. for o in $(echo $options) do if ... (3 Replies)
Discussion started by: stuaz
3 Replies

6. Shell Programming and Scripting

How to validate input parameters?

Hi, I wonder how I can know if the input parameters to the script are numbers or text Thanks (11 Replies)
Discussion started by: Gengis-Kahn
11 Replies

7. Shell Programming and Scripting

Another validate input Question.

I'm writing a bash shell script to 'help' me post to susepaste (I can NEVER remember the time options). Here's the code: #!/bin/bash ########## # # Project : personal script. # Started : Wed Aug 03, 2011 # Author : Habitual # Description : susepaste c-li script with user... (5 Replies)
Discussion started by: Habitual
5 Replies

8. Shell Programming and Scripting

How to validate user's input..?

$Input_filename=$ARGV; if (!-d $Input_filename && ! -e $Input_filename) { print "USAGE: Please enter '$ABCD/def/dsed.txt' as an arguement \n"; exit; } 1. Input Is suppose to be something like "$ABCD/def/dsed.txt". if the input is wrong the script should throw an ERROR message.... (2 Replies)
Discussion started by: Rashid Khan
2 Replies

9. Shell Programming and Scripting

Validate input files and update

We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not.Inputfile formatsrc_sps_d_Call_Center_Reporting_yyyymmdd_01.dat SPS-Service nameYYYY-yearMM-MonthDD-dayLike above we will get n number of files for... (1 Reply)
Discussion started by: katakamvivek
1 Replies

10. Shell Programming and Scripting

Validate input files daily

We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not. Daily client will place the files in a particular path.Below files which I need to process for 04/01/2013(Load date).... (2 Replies)
Discussion started by: katakamvivek
2 Replies
obexftp(1)																obexftp(1)

NAME
obexftp - Mobile Equipment file transfer tool SYNOPSIS
obexftp [OPTION] [COMMANDS] DESCRIPTION
obexftp is used to access files on mobile equipment, i.e. cell phones. With obexftpd you can transfer files between any computers using IrDA, Bluetooth and TCP/IP. This tool lets you access the ObexFTP library by the means of a command line interface. You might consider using the other means avail- able. E.g. the ObexFS filesystem for Linux. OPTIONS
The ordering of options is important. Every command will use the most recent device set. Every file without command switch will apply to the command given most recent. See EXAMPLES TRANSPORT OPTIONS -i, --irda Connect using the IrDA protocol. This is the default. -b device, --bluetooth device Connect to this bluetooth device. If the device is not given the first device found will be used. -B number, --channel number Use this bluetooth channel when connecting. The channel will be discoverd automatically if this option is not used. -d no/address, --hci no/address Use the bluetooth device referenced by number or address as source device for the connection. -u intf no, --usb intf no Connect to this usb interface or list all available usb interfaces. -t device, --tty device Connect to this tty device. -n host, --network host Connect to this network host. COMPATIBILITY OPTIONS -U uuid, --uuid uuid Select the UUID to connect with. Recognized values are currently "none" needed by some Nokia mobile devices, "FBS" (default) for the normal file browsing service, "IRMC" for IRMC synchronisation and "S45" when connecting to a Siemens Mobile phone via cable or "SHARP" for PCSOFTWARE UUID with Sharp devices. -H, --noconn Suppress connection IDs (i.e. send no connection header to the mobile). -S, --nopath Don't use "setpath" commands (i.e. send the whole path as filename to the mobile). Can be used together with --noconn and --uuid none to send an OBEX-PUSH. SETTING THE FILE PATH -c folder, --chdir folder Set the mobiles current working directory. -C folder, --mkdir folder Set the mobiles current working directory. The folder will be created if it doesn't exist. -l folder, --list folder List a folder. SENDING AND RETRIEVING FILES -o path, --output path Specify the target file name, overriding the implicit local name from --get or the implicit remote name from --put -g source, --get source Retrieve files from mobile. -G source, --getdelete source Retrieve files from mobile and delete them on the mobile -p source, --put source Send files to the mobile. -k source, --delete source Delete files from the mobile. EXPERIMENTAL EXTRAS -X, --capability Retrieve the capability object from the mobile (if available). -Y, --probe Probe and report device characteristics -x, --info Retrieve misc infos from mobile. I.e. memory size and free memory. Siemens specific for now. -m src dest, --move src dest Move (rename) files on the mobile. Siemens specific for now. VERSION INFORMATION AND HELP -v, --verbose Be verbose and give some additional infos. -V, --version Print version string and exit. -h, --help, --usage Print short usage instructions. EXAMPLES
To get the directory listing from the first irda device obexftp -i -l or just obexftp -l as IrDA is the default. To get the file bar from directory foo from the first bluetooth device obexftp -b -c foo -g bar To send the file bar to directory foo with device on first serial port obexftp -t /dev/ttyS0 -c foo -p bar It is possible to use RfComm (serial port over bluetooth) obexftp -t /dev/rfcomm0 -c foo -p bar And also IrComm (serial port over IrDA) obexftp -t /dev/ircomm0 -c foo -p bar To send the file bar using plain OBEX PUSH obexftp --bluetooth --nopath --noconn --uuid none --put bar SEE ALSO
obexftpd(1), openobex(3), obexftp(3), multicobex(3), libbfb(3). BUGS
Bugs ? Features ! NOTES
The software has been tested and reported working on at least Siemens, Ericsson, and Nokia phones. AUTHOR
Christian W. Zuckschwerdt <zany@triq.net> 17 February 2009 obexftp(1)
All times are GMT -4. The time now is 02:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy