Sponsored Content
Full Discussion: Need help for script.
Top Forums UNIX for Dummies Questions & Answers Need help for script. Post 302215378 by jurrien on Wednesday 16th of July 2008 07:25:02 AM
Old 07-16-2008
i think something like ` echo $string | sed s/.*trans_id=//g |cut -f 1 -d "&" `
would do.
it replaces first everything including and ending with trans_id= to "" and then it choses the first field with as a field seperator &.
soemthing like this would do i think :P

echo '
> <a href="https://www.stage2qa079.paypal.com/cgi-bin/webscr?cmd=_ebay-checkout&session_id=0&business=GY8Q3EQNoTkzyenam5jQ0WoupxDvrymDJySVd1NgY1ZqgJ17t9IqlQk%2FxxJAOTpH%2F 95j9132N05ThOWSMGAduw%3D%3D&sc_track=0&loc_id=1&linkstate=hard&shipping_costs_calculable=true&psite_ id=0&xinfo=JrdYd3Gy8SLTgMermJrC0Cxo0nXWS2lG6m5tF5lcpzrErrQNipeEZ0w5WguOeEaR03JfT0UA%2BXouyk6%2BXA%2B 9EA%3D%3D&site_id=us&iscouponchosen=false&trans_id=7166101006&item_id=160000833964" alt="Go to PayPal Checkout">https://www.stage2qa079.paypal.com/c...nchosen=false&trans_id=7166101006&item_id=160000833964</a>' | sed s/.*trans_id=//g |cut -f 1 -d "&"

7166101006

Last edited by jurrien; 07-16-2008 at 08:30 AM..
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

Hi guys I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file. #!/bin/sh echo " $2 $3 $4 $5 $6 $7 isql -w400 -U$2 -S$5 -P$3 << xxx use $4 go print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies

2. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

3. UNIX for Dummies Questions & Answers

Calling a script from master script to get value from called script

I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below. #masterscript.sh ./callingscript.sh echo $fileExist #callingscript.sh echo "The script is called"... (2 Replies)
Discussion started by: Raj Roy
2 Replies

4. Shell Programming and Scripting

Shell script works fine as a standalone script but not as part of a bigger script

Hello all, I am facing a weird issue while executing a code below - #!/bin/bash cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset sh UKBA_publish.sh UKBA 28082015 3 if then echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies

5. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
Vend::Accounting::SQL_Ledger(3pm)			User Contributed Perl Documentation			 Vend::Accounting::SQL_Ledger(3pm)

   parts table
       CREATE TABLE "parts" (	   "id" integer DEFAULT nextval('id'::text),	  "partnumber" text,	  "description" text,	   "bin" text,
	    "unit" character varying(5),      "listprice" double precision,	 "sellprice" double precision,	    "lastcost" double precision,
	    "priceupdate" date DEFAULT date('now'::text),      "weight" real,	   "onhand" real DEFAULT 0,	 "notes" text,	    "makemodel"
       boolean DEFAULT 'f',	 "assembly" boolean DEFAULT 'f',      "alternate" boolean DEFAULT 'f',	    "rop" real,      "inventory_accno_id"
       integer,      "income_accno_id" integer,      "expense_accno_id" integer,      "obsolete" boolean DEFAULT 'f' );

   oe table
       CREATE TABLE "oe" (	"id" integer DEFAULT nextval('id'::text),      "ordnumber" text,      "transdate" date DEFAULT date('now'::text),
	    "vendor_id" integer,      "customer_id" integer,	  "amount" double precision,	  "netamount" double precision,      "reqdate"
       date,	  "taxincluded" boolean,      "shippingpoint" text,	 "notes" text,	    "curr" character(3) );

NAME
Vend::Accounting::SQL-Ledger - SQL-Ledger Accounting Interface for Interchange DESCRIPTION
This module is an attempt to create a set of callable routines that will allow the easy integration of the SQL-Ledger Accounting package with Interchange. It handles the mapping of the Interchange variable names to the appropriate SQL-Ledger ones as well as parsing the html returned by the SQL-Ledger "API". Background: SQL-Ledger Accounting "www.sql-ledger.org" is a multiuser, double entry, accounting system written in Perl and is licensed under the GNU General Public License. The SQL-Ledger API: SQL-Ledger functions can be accessed from the command line by passing all the variables in one long string to the perl script. The variable=value pairs must be separated by an ampersand. See "www.sql-ledger.org/misc/api.html" for more details on the command line interface. ------------------------------------------------------------------ This module also happens to be the author's first perl module and probably his second or third perl program in addition to "Hello World". :) So please go easy on me. -Daniel Schema CREATE SEQUENCE "id" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; CREATE TABLE "makemodel" ( "id" integer, "parts_id" integer, "name" text ); CREATE TABLE "gl" ( "id" integer DEFAULT nextval('id'::text), "source" text, "description" text, "transdate" date DEFAULT date('now'::text) ); CREATE TABLE "chart" ( "id" integer DEFAULT nextval('id'::text), "accno" integer, "description" text, "charttype" character(1) DEFAULT 'A', "gifi" integer, "category" character(1), "link" text ); CREATE TABLE "defaults" ( "inventory_accno_id" integer, "income_accno_id" integer, "expense_accno_id" integer, "fxgain_accno_id" integer, "fxloss_accno_id" integer, "invnumber" text, "ordnumber" text, "yearend" character varying(5), "curr" text, "weightunit" character varying(5), "businessnumber" text, "version" character varying(8) ); CREATE TABLE "acc_trans" ( "trans_id" integer, "chart_id" integer, "amount" double precision, "transdate" date DEFAULT date('now'::text), "source" text, "cleared" boolean DEFAULT 'f', "fx_transaction" boolean DEFAULT 'f' ); CREATE TABLE "invoice" ( "id" integer DEFAULT nextval('id'::text), "trans_id" integer, "parts_id" integer, "description" text, "qty" real, "allocated" real, "sellprice" double precision, "fxsellprice" double precision, "discount" real, "assemblyitem" boolean DEFAULT 'f' ); CREATE TABLE "vendor" ( "id" integer DEFAULT nextval('id'::text), "name" character varying(35), "addr1" character varying(35), "addr2" character varying(35), "addr3" character varying(35), "addr4" character varying(35), "contact" character varying(35), "phone" character varying(20), "fax" character varying(20), "email" text, "notes" text, "terms" smallint DEFAULT 0, "taxincluded" boolean ); CREATE TABLE "customer" ( "id" integer DEFAULT nextval('id'::text), "name" character varying(35), "addr1" character varying(35), "addr2" character varying(35), "addr3" character varying(35), "addr4" character varying(35), "contact" character varying(35), "phone" character varying(20), "fax" character varying(20), "email" text, "notes" text, "discount" real, "taxincluded" boolean, "creditlimit" double precision DEFAULT 0, "terms" smallint DEFAULT 0, "shiptoname" character varying(35), "shiptoaddr1" character varying(35), "shiptoaddr2" character varying(35), "shiptoaddr3" character varying(35), "shiptoaddr4" character varying(35), "shiptocontact" character varying(20), "shiptophone" character varying(20), "shiptofax" character varying(20), "shiptoemail" text ); CREATE TABLE "parts" ( "id" integer DEFAULT nextval('id'::text), "partnumber" text, "description" text, "bin" text, "unit" character varying(5), "listprice" double precision, "sellprice" double precision, "lastcost" double precision, "priceupdate" date DEFAULT date('now'::text), "weight" real, "onhand" real DEFAULT 0, "notes" text, "makemodel" boolean DEFAULT 'f', "assembly" boolean DEFAULT 'f', "alternate" boolean DEFAULT 'f', "rop" real, "inventory_accno_id" integer, "income_accno_id" integer, "expense_accno_id" integer, "obsolete" boolean DEFAULT 'f' ); CREATE TABLE "assembly" ( "id" integer, "parts_id" integer, "qty" double precision ); CREATE TABLE "ar" ( "id" integer DEFAULT nextval('id'::text), "invnumber" text, "ordnumber" text, "transdate" date DEFAULT date('now'::text), "customer_id" integer, "taxincluded" boolean, "amount" double precision, "netamount" double precision, "paid" double precision, "datepaid" date, "duedate" date, "invoice" boolean DEFAULT 'f', "shippingpoint" text, "terms" smallint DEFAULT 0, "notes" text, "curr" character(3) ); CREATE TABLE "ap" ( "id" integer DEFAULT nextval('id'::text), "invnumber" text, "transdate" date DEFAULT date('now'::text), "vendor_id" integer, "taxincluded" boolean, "amount" double precision, "netamount" double precision, "paid" double precision, "datepaid" date, "duedate" date, "invoice" boolean DEFAULT 'f', "ordnumber" text, "curr" character(3) ); CREATE TABLE "partstax" ( "parts_id" integer, "chart_id" integer ); CREATE TABLE "tax" ( "chart_id" integer, "rate" double precision, "taxnumber" text ); CREATE TABLE "customertax" ( "customer_id" integer, "chart_id" integer ); CREATE TABLE "vendortax" ( "vendor_id" integer, "chart_id" integer ); CREATE TABLE "oe" ( "id" integer DEFAULT nextval('id'::text), "ordnumber" text, "transdate" date DEFAULT date('now'::text), "vendor_id" integer, "customer_id" integer, "amount" double precision, "netamount" double precision, "reqdate" date, "taxincluded" boolean, "shippingpoint" text, "notes" text, "curr" character(3) ); CREATE TABLE "orderitems" ( "trans_id" integer, "parts_id" integer, "description" text, "qty" real, "sellprice" double precision, "discount" real ); CREATE TABLE "exchangerate" ( "curr" character(3), "transdate" date, "buy" double precision, "sell" double precision ); perl v5.14.2 2011-03-09 Vend::Accounting::SQL_Ledger(3pm)
All times are GMT -4. The time now is 10:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy