Sponsored Content
Top Forums Shell Programming and Scripting way to print all the string till we get a space and a number Post 302278028 by villain41 on Monday 19th of January 2009 04:56:21 AM
Old 01-19-2009
My script o/p is as below

0 892
SetExpressCheckout 4
DoExpressCheckout Payment 4
0-211 3
GetExpressCheckoutDetails 4
3.auth error.INTERNAL.5005 1
2.NVPPAYMENTSERV INTERNAL 0(10002) 1
2.NVPPAYMENTSERV INTERNAL.5005 1

Table generation time : 0.61 ms
Cube clean time : 1.93 ms

i=0,the logic that I applied was store this o/p in a single variable called "col".
then col[i] =0 and col[i+1]=892 so on and increment i with 2.

But the problem I found was with
DoExpressCheckout Payment
2.NVPPAYMENTSERV INTERNAL 0(10002) 1
2.NVPPAYMENTSERV INTERNAL.5005 1

as I wanted "DoExpressCheckout Payment" to be assigned to col[i] but instead "DoExpressCheckout" was assigned and the "Payment" was treated as a seperate variable.But I want this not happen.

I want the o/p to be parsed and when a condition like "space + number" is met then store that entire string to a variable.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print lines till till a pattern is matched in loop

Dear All I have a file like this 112534554 446538656 444695656 225696966 226569744 228787874 113536566 443533535 222564552 115464656 225445345 225533234 I want to cut the file into different parts where the first two columns are '11' . The first two columns will be either... (3 Replies)
Discussion started by: anoopvraj
3 Replies

2. Shell Programming and Scripting

How to print the number of lines from a file, the starting string should be passed`

Hi , I have file, which has the below content: line 100 a b c d line300 a s d f s line200 a s d a (3 Replies)
Discussion started by: little_wonder
3 Replies

3. Shell Programming and Scripting

awk or sed command to print specific string between word and blank space

My source is on each line 98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies

4. Shell Programming and Scripting

Remove line starting from space till end.

Hi, I have a code tag, from which i have the below snippet: intelrpt.GetCMB_FB type=ODBC> intelrpt.GetCMB_FB type=SYBASE> I want the output like: intelrpt.GetCMB_FB intelrpt.GetCMB_FB That is remove the lines starting from WHITESPACE till end. Please help. I am new to... (7 Replies)
Discussion started by: anupdas
7 Replies

5. Shell Programming and Scripting

Bash take word after specific point and till next space?

Hello, I have an output like Interface Chipset Driver wlan0 Intel 4965/5xxx iwlagn - and I want to take only the 'wlan0' string. This can be done by a="Interface Chipset Driver wlan0 Intel 4965/5xxx iwlagn - " b=${a:25:6} echo $bThe thing is that wlan0 can be something else, like eth0 or... (2 Replies)
Discussion started by: hakermania
2 Replies

6. Programming

Find and print number after string in C

I'm trying find and print a number after a specific user passed string in each line of a text file using C (as requested by the powers that be). I've pieced together enough to read the file, find the string and print the line it was found on but I’m not sure where to even start in terms of finding... (3 Replies)
Discussion started by: cgol
3 Replies

7. Shell Programming and Scripting

find string nth occurrence in file and print line number

Hi I have requirement to find nth occurrence in a file and capture data from with in lines (between lines) Data in File. <QUOTE> <SESSION> <ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/> <ATTRIBUTE NAME='Service Name' VALUE='None'/> </SESSION> <SESSION> <ATTRIBUTE... (6 Replies)
Discussion started by: tmalik79
6 Replies

8. Shell Programming and Scripting

Print characters till the next space when the pattern is found

i have a file which contains alphanumeric data in every line. what i need is the data after certain pattern. the data after the pattern is not of fixed length so i need the data till the space after the pattern. Input file: bfdkasfbdfg khffkf lkdhfhdf pattern (datarequired data not required)... (2 Replies)
Discussion started by: gpk_newbie
2 Replies

9. Shell Programming and Scripting

Adding variable number of space in between two string

Hi, I am looking for the way to add variable number of spaces between two string. e.g input line is a ,bb abc ,bcb pqr ,bfg My output should be something like this a ,bb abc ,bcb pqr ,bfg This text... (9 Replies)
Discussion started by: diehard
9 Replies

10. Shell Programming and Scripting

Print String N times the number before it

Hey All, I want want to print a string N times the number N before it. Like i have "20 hello". so i want to print hello hello hello . . . . . 20 times.. Please help me.. I am not able o figure out.. how to do the same? (8 Replies)
Discussion started by: jaituteja
8 Replies
Vend::Payment::iTransact(3pm)				User Contributed Perl Documentation			     Vend::Payment::iTransact(3pm)

NAME
Vend::Payment::iTransact - Interchange iTransact Support SYNOPSIS
&charge=itransact or [charge mode=itransact param1=value1 param2=value2] PREREQUISITES
Net::SSLeay or LWP::UserAgent and Crypt::SSLeay Only one of these need be present and working. DESCRIPTION
The Vend::Payment::iTransact module implements the itransact() routine for use with Interchange. It is compatible on a call level with the other Interchange payment modules. To enable this module, place this directive in "interchange.cfg": Require module Vend::Payment::iTransact This must be in interchange.cfg or a file included from it. Make sure CreditCardAuto is off (default in Interchange demos). The mode can be named anything, but the "gateway" parameter must be set to "itransact". To make it the default payment gateway for all credit card transactions in a specific catalog, you can set in "catalog.cfg": Variable MV_PAYMENT_MODE itransact It uses several of the standard settings from Interchange payment. Any time we speak of a setting, it is obtained either first from the tag/call options, then from an Interchange order Route named for the mode, then finally a default global payment variable, For example, the "id" parameter would be specified by: [charge mode=itransact id=YouriTransact] or Route itransact id YouriTransactID or Variable MV_PAYMENT_ID YouriTransactID The active settings are: id Your iTransact account ID, supplied by iTransact when you sign up. Global parameter is MV_PAYMENT_ID. home_page The internet address of your site. Defaults to "http://__SERVER_NAME__" if not set. Global parameter is MV_PAYMENT_HOME_PAGE. remap This remaps the form variable names to the ones needed by iTransact. See the "Payment Settings" heading in the Interchange documentation for use. Troubleshooting Try the instructions above, then enable test mode. A test order should complete. Then move to live mode and try a sale with the card number "4111 1111 1111 1111" and a valid expiration date. The sale should be denied, and the reason should be in [data session payment_error]. If nothing works: o Make sure you "Require"d the module in interchange.cfg: Require module Vend::Payment::iTransact o Make sure either Net::SSLeay or Crypt::SSLeay and LWP::UserAgent are installed and working. You can test to see whether your Perl thinks they are: perl -MNet::SSLeay -e 'print "It works "' or perl -MLWP::UserAgent -MCrypt::SSLeay -e 'print "It works "' If either one prints "It works." and returns to the prompt you should be OK (presuming they are in working order otherwise). o Check the error logs, both catalog and global. o Make sure you set your account ID properly. o Try an order, then put this code in a page: <XMP> [calc] my $string = $Tag->uneval( { ref => $Session->{payment_result} }); $string =~ s/{/{ /; $string =~ s/,/, /g; return $string; [/calc] </XMP> That should show what happened. o If all else fails, consultants are available to help with integration for a fee. See http://www.icdevgroup.org/ BUGS
There is actually nothing *in* Vend::Payment::iTransact. It changes packages to Vend::Payment and places things there. AUTHORS
Mark Johnson and Cameron Prince, based on original code by Mike Heins. perl v5.14.2 2011-03-09 Vend::Payment::iTransact(3pm)
All times are GMT -4. The time now is 09:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy