Sponsored Content
Top Forums Shell Programming and Scripting Single parse to grab two chunks of string Post 302976479 by vgersh99 on Wednesday 29th of June 2016 04:27:42 PM
Old 06-29-2016
one way:
Code:
echo '323 => 1111,Terry berry home,,,sdfoijdsfiovjfdv' | awk -F'[, ]' '{print $1, $4, $5}'

This User Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

String parse question

I have a string of data that looks like this: private.enterprises.954.1.1.1.1.1.2618 \(OctetString\): U private.enterprises.954.1.1.1.1.2.2618 \(OctetString\): 2618 I am trying to parse the string to only return the values after the ":". Ex from above "U" and "2618". Any suggestions? (5 Replies)
Discussion started by: mnreferee
5 Replies

2. Shell Programming and Scripting

how to parse this string

I want to get filenames from the following input. How can I parse this in bash. input data ------------------------------------------------------------------- path=/aaa/bbb/filename1;/aaa/filename2;/aaa/bbb/ccc/ddd/filename3 -------------------------------------------------------------------... (13 Replies)
Discussion started by: hcliff
13 Replies

3. Shell Programming and Scripting

Parse string

Hi, I need to parse a string, check if there are periods and strip the string. For example i have the following domains and subdomains: mydomain.com, dev.mydomain.com I need to strip all periods so i have a string without periods or domain extensions: mydomain, devmydomain. I use this for... (12 Replies)
Discussion started by: ktm
12 Replies

4. Shell Programming and Scripting

Grab first or second line after a search string

In a shell script, I need to grab the first or second line after a search string in a file. For example: File.out: Random Info Manufacturer: XYZPDQ System Info Manufacturer: Hewlett-Packard Product Name: ProLiant I search for the word FILE, I want to be able to grab the line... (1 Reply)
Discussion started by: jwk1230
1 Replies

5. Shell Programming and Scripting

Parse a single line file and store value.

I have a single line file like this : Average Fragmentation Quotient : 3.084121 Now I want to store the value which comes after ":" i,e 3.084121 into a variable. And if this variable crosses above 6 i want to call another script... can any one help me on this... (7 Replies)
Discussion started by: Hyp_Todd
7 Replies

6. Shell Programming and Scripting

parse a mixed alphanumeric string from within a string

Hi, I would like to be able to parse out a substring matching a basic pattern, which is a character followed by 3 or 4 digits (for example S1234 out of a larger string). The main string would just be a filename, like Thisis__the FileName_S1234_ToParse.txt. The filename isn't fixed, but the... (2 Replies)
Discussion started by: keaneMB
2 Replies

7. Shell Programming and Scripting

Replace string, grab files, rename and move

Hello there! I'm having a lot of trouble writing a script. The script is supposed to: 1) Find all files with the name "Object.mtl" within each folder in the directory: /Users/username/Desktop/convert/Objects 2) Search and replace the string ".bmp" with ".tif" (without the quotations) 3)... (1 Reply)
Discussion started by: Blue Solo
1 Replies

8. Homework & Coursework Questions

How to use xargs to repeat as a loop to grab date string?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: My goal to find how many requests in 14 days from weblog server. I know to cat a weblog file to wc -l to find the... (8 Replies)
Discussion started by: scopiop
8 Replies

9. Shell Programming and Scripting

Need to parse the multiple definitions from a single line and assign

Hi, I need a help on my requirement that eg: NEED="TEST=Name WORK=Ps DEL=let" Here the definition can be n number, could anybody have an idea to get the output as, TEST=Name WORK=Ps DEL=let .. .. till the 'n' definitions listed. Any suggestions please..... Regards, ricky (6 Replies)
Discussion started by: ricky-row
6 Replies

10. Shell Programming and Scripting

Parse for 2 numbers in large single line

Hi All, I am writing a script in which I need to gather 2 numbers for 'total' and 'successful'. The goal is to compare the two numbers and if they are not equal, rerun the task until all are successful. I'm thinking the best way will be with awk or sed, but I really don't know where to begin... (8 Replies)
Discussion started by: hburnswell
8 Replies
Vend::Payment::PSiGate(3pm)				User Contributed Perl Documentation			       Vend::Payment::PSiGate(3pm)

NAME
Vend::Payment::PSiGate - Interchange PSiGate Support SYNOPSIS
&charge=psigate or [charge mode=psigate 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::PSiGate module implements the psigate() 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::PSiGate 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 "psigate". 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 psigate 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=psigate id=YourPSiGateMerchantID] or Route psigate id YourPSiGateMerchantID or Variable MV_PAYMENT_ID YourPSiGateMerchantID The active settings are: id Your PSiGate.com account ID, supplied by PSiGate.com when you sign up. Global parameter is MV_PAYMENT_ID. referer A valid referering url (match this with your setting on PSiGate). Global parameter is MV_PAYMENT_REFERER. transaction The type of transaction to be run. Valid values are: Interchange PSiGate Note ---------------- ----------------- --------- auth '1', PreAuth sale '0', Sale settle '2', PostAuth void '9', Void remap This remaps the form variable names to the ones needed by PSiGate. See the "Payment Settings" heading in the Interchange documentation for use. test Set this to "TRUE" if you wish to operate in test mode, i.e. set the PSiGate "x_Test_Request" query paramter to TRUE.i Examples: Route psigate test TRUE or Variable MV_PAYMENT_TEST TRUE or [charge mode=psigate test=TRUE] Troubleshooting Try the instructions above, then enable test mode. A test order should complete. Disable test mode, then test in various PSiGate error modes by using the credit card number 4111 1111 1111 1111. Then 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::PSiGate 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 payment parameters 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, Red Hat and other consultants are available to help with integration for a fee. BUGS
There is actually nothing *in* Vend::Payment::PSiGate. It changes packages to Vend::Payment and places things there. AUTHORS
Mark Stosberg <mark@summersault.com>, based on original code by Mike Heins <mheins@redhat.com>. CREDITS
Jeff Nappi <brage@cyberhighway.net> Paul Delys <paul@gi.alaska.edu> webmaster@nameastar.net Ray Desjardins <ray@dfwmicrotech.com> Nelson H. Ferrari <nferrari@ccsc.com> perl v5.14.2 2011-03-09 Vend::Payment::PSiGate(3pm)
All times are GMT -4. The time now is 02:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy