Sponsored Content
Top Forums Shell Programming and Scripting shell script with decision making Post 302655897 by vasil on Thursday 14th of June 2012 03:02:58 AM
Old 06-14-2012
shell script with decision making

Hi all
I need help for the issue below.
I need to create script:
Code:
FORM_cmd=query || import
FORM_command=add
FORM_msisdn=389881234567
FORM_provcode=SK
FORM_attr=12

FORM_cmd can be "query" or "import"
when FORM_cmd="query" then execute -> spdci -cmd $FORM_cmd FORM_cmd

when FORM_cmd="import" then execute -> echo $FORM_command  $FORM_msisdn:$FORM_provcode=$FORM_attr > /tmp/tmp.txt | spdci -cmd  $FORM_cmd /tmp/tmp.txt

Thank you in advance

Last edited by Scrutinizer; 06-14-2012 at 05:56 AM.. Reason: Code tags also for pseudocode
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making a SOAP call from within unix shell scripts

Hi guys, Is it possible to make SOAP calls from within Unix shell scripts? I need to access a web service from within UNIX in order to lookup something while I am doing some parsing on a file. Regards, Laud (2 Replies)
Discussion started by: Laud12345
2 Replies

2. Shell Programming and Scripting

Need help making a script

Here is what I have: #!/bin/bash # Setup year date and month YR=`date +%Y '{print $6}'` MON=`date +%b '{print $2}'` DAY=`date +%d '{print $3}'` file=$YR$MOY$DOM # clear # Dump database using USER/PASS to ..sql mysqldump --user=me -ppass database > database-db.$file.sql The YR, MON and... (2 Replies)
Discussion started by: npereira
2 Replies

3. Shell Programming and Scripting

Problem in making shell script

Dear all Dear Brother I am bit new to programming or shell scripting. I have given one shell script which is regarding combining all the 240 or less files in a particular folderwhich is related to one hour of the day. There will be 24 these kind of folders related to a day . It means there... (4 Replies)
Discussion started by: girish.batra
4 Replies

4. Shell Programming and Scripting

making shell script

Hi , I am new to shell scripting I want to make script as to execute followng command mysqldump -u (user name) -p(password) database name>filename.sql this file saves with current date and time and execute automatically at particular time which I give (10 Replies)
Discussion started by: kaushik02018
10 Replies

5. Shell Programming and Scripting

Making file inside shell script

Hi, i have written a shell script and its working fine till now. Now, i have to enhance it with a small updation. i need to make a file inside my file that will contain the below parameters 1) Customer_id 2) Server_id 3) No. Account All the above variables are already been taken in... (3 Replies)
Discussion started by: dazdseg
3 Replies

6. Shell Programming and Scripting

Query on decision making...

is_number() { echo $1|egrep '^*$' 2>&1 1>/dev/null return $? }why the following snippet always give an output as "no" and never "yes" whatever the parameter I give to function is_number? if ]; then echo yes; else echo no; fi In addition, the function is_number() is... (5 Replies)
Discussion started by: biglau
5 Replies

7. Shell Programming and Scripting

Using shell scripting for making queries on postgres sql

I have a situation where I have a list of airplanes that make a series of flights. Therefore I am looking up the different flights that each airplane makes based on a postgres sql query: select flightid from plane where airplane='DELTAx' As a result I get a series of flight numbers... (0 Replies)
Discussion started by: JSNY
0 Replies

8. UNIX for Beginners Questions & Answers

Handling decision making logic

------- Output Screen -------- Choose the option ----------------- 1.Input 2.Output 3.CFT Uniq x.Exit ----------------- 2 Enter the Output flow IDF PBL5572U Enter the Output existing flow IDF PBL5198H sf_PBL5572U.cmd file exist in invalid path or doesn't exist (0 Replies)
Discussion started by: Vijaykannan T
0 Replies
4S-IMPORT(1J)							      4store							     4S-IMPORT(1J)

NAME
4s-import -- Import RDF into a 4store KB SYNOPSIS
4s-import kbname [-v] [-a] [-M default-model] [-m model] [-f format] [rdf-file] ... -v, --verbose Increase verbosity (by default success is silent) -a, --add Ordinarily importing RDF to a model replaces any previous contents of that model, by using the --add flag this behaviour is overridden and any triples which were previously in the model are retained. -M, --model-default Set a model (graph) URI which is used by default for all imported files -m, --model Set a model (graph) URI for the next named file only (overrides -M if it has been used) -f, --format Tell the RDF parser the format of the files (if not specified the parser will guess) SEE ALSO
4s-query(1), 4s-size(1), 4s-httpd(1), 4s-backend(1), 4s-delete-model(1) EXAMPLES
$ 4s-import demo one.ttl two.xrdf Imports two files into the demo KB, each as a separate model (graph) guessing the RDF format used for each file $ 4s-import demo -M http://example.com/menu starters.ttl mains.ttl sweets.ttl Imports three files into a single graph named <http://example.com/menu> 4store May 31, 2019 4store
All times are GMT -4. The time now is 04:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy