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)
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)
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)
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)
$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)
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)
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
LEARN ABOUT DEBIAN
rapi_connection_from_name
RAPI_CONNECTION_FROM_NAME(3) http://www.synce.org/ RAPI_CONNECTION_FROM_NAME(3)NAME
rapi_connection_from_name - obtain connection for RAPI function calls
SYNOPSIS
#include <rapi.h>
RapiConnection *rapi_connection_from_name(const char *device_name);
RapiConnection *rapi_connection_from_info(SynceInfo *info);
void rapi_connection_select(RapiConnection *connection);
void rapi_connection_destroy(RapiConnection *connection);
HRESULT CeRapiInit();
STDAPI CeRapiUninit();
DESCRIPTION
The rapi_connection_from_info() function returns a pointer to a newly allocated RapiConnection struct, used for remote function calls to a
mobile device. The RapiConnection keeps a pointer to the SynceInfo struct but does not copy it, therefore freeing the SynceInfo before the
RapiConnection is not recommended.
rapi_connection_from_name() accomplishes the same for the connected device named device_name. Refer to synce_info_new(3) for insight on
how this name and the connection daemon in use can affect the device contacted.
rapi_connection_select() allows for selection between multiple active connections. NULL can be passed to result in no active connection.
rapi_connection_destroy() frees a RapiConnection. This should not be called before CeRapiUninit().
CeRapiInit() connects the current RapiConnection to it's mobile device. If already initialised, CERAPI_E_ALREADYINITIALIZED is returned.
CeRapiUninit() destroys the connection for the current RapiConnection. The RapiConnection cannot be re-initialised, it must be destroyed.
An example of using multiple devices follows.
/*
* SynCE support for switching between multiple devices
*
* Example code for two devices follows!
*
* It shows two different ways to get a RapiConnection object.
*
*/
RapiConnection* a = rapi_connection_from_name("device_a");
rapi_connection_select(a);
CeRapiInit()
SynceInfo* info_b = synce_info_new("device_b");
RapiConnection* b = rapi_connection_from_info(info_b);
rapi_connection_select(b);
CeRapiInit()
rapi_connection_select(a);
...some RAPI calls to device A...
rapi_connection_select(b);
...some RAPI calls to device B...
rapi_connection_select(a);
CeRapiUninit();
rapi_connection_destroy(a);
rapi_connection_select(b);
CeRapiUninit();
rapi_connection_destroy(b);
synce_info_destroy(info_b);
RETURN VALUE
rapi_connection_from_name() and rapi_connection_from_info() return a pointer to a new RapiConnection.
CeRapiInit() and CeRapiUninit() return S_OK on success or an error code on failure.
AUTHOR
This manual page was written by Mark Ellis <mark_ellis@users.sourceforge.net>.
SEE ALSO synce(7), synce_info_new(3), odccm(1), vdccm(1)The SynCE Project 2007-08-26 RAPI_CONNECTION_FROM_NAME(3)