Sponsored Content
Top Forums Shell Programming and Scripting How to: Parse text string into variables using Korn shell Post 302198605 by shew01 on Friday 23rd of May 2008 09:04:03 AM
Old 05-23-2008
Joeyg,

This is wonderful! My background is in VMS scripting, and I've been looking for a Korn equivalent to DCL F$FAO for a long time. This is the closest I've seen.

Thanks for the snippet of code. I have what I need now.

Have a great weekend!

J
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Variables Naming in Korn Shell

Hi every body, I want to know what is the different between the following: $VAR1 ${VAR2} "${VAR3}" Are they equivalent? Thanks in advance (1 Reply)
Discussion started by: aldowsary
1 Replies

2. Shell Programming and Scripting

How to parse config variables from external file to shell script

How do i use a config.txt to recursively pass a set of variables to a shell script eg my config.txt looks like this : path=c://dataset/set1 v1= a.bin v2= b.bin path=c://dataset/set2 v1= xy.bin v2= abc.bin .................. and so on . and my testscript : (2 Replies)
Discussion started by: pradsh
2 Replies

3. UNIX for Advanced & Expert Users

Accessing PL/SQL OUT variables in Korn Shell Script

Hello All, I was just wondering if there is any direct way to access PL/SQL OUT variables from Korn Shell Script. I could already figure out how to return a single value back from PL/SQL to Shell Script (using bind variable). But, what if we want to return multiple values? One option I... (4 Replies)
Discussion started by: bright_future
4 Replies

4. Shell Programming and Scripting

How to parse a string into variables

I'm working in korn shell and have a variable which contains a string like: aa_yyyymmdd_bbb_ccc_ddd.abc. I want to treat the _ and . as delimiters and parse the string so I end up with 6 values in variables that I can manipulate. My original plan was to use var1=`echo $sting1 | cut -c1-c2` but... (9 Replies)
Discussion started by: aquimby
9 Replies

5. Shell Programming and Scripting

String parsing in Korn Shell

Hi everybody, I have a string stored in a variable called record: record="SNMPv2-SMI::ent.9.9.43.1.3.9.2 = Timeticks: (177330898) 20 days, 12:35:08.98" I want to write some regular expressions good for Korn Shell to extract the number between parenthesis, in this case 177330898, and put it in... (3 Replies)
Discussion started by: omoyne
3 Replies

6. Shell Programming and Scripting

floating point variables korn shell

Hi I'm not using Korn93 but want to use floating point variable. Is there any solution to do that ? thx for help. ---------- Post updated at 02:28 PM ---------- Previous update was at 12:38 PM ---------- I have the following peace of code: for n in `cat log.January.1.array` do ... (3 Replies)
Discussion started by: presul
3 Replies

7. Shell Programming and Scripting

Korn shell program to parse CSV text file and insert values into Oracle database

Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database. I need to write the korn shell program on Red Hat Enterprise Linux server. Oracle database is 10g. (15 Replies)
Discussion started by: shellguy
15 Replies

8. Shell Programming and Scripting

korn shell: check the content of a string of a variable

hello, i have a variable which should have following content : var="value1" or var="value2" or var="value2:*" # example: value2:22 how can i check : - if the content is ok (value1 / value2* ) - the two options of "value2" when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies

9. Shell Programming and Scripting

'*' vs. '@' in Korn Shell Array Variables

In order to use the shellcurses functions described at: Shell Curses function library I am learning about ksh, which has arrays. My trusty Kochan & Wood book says that for any Korn Shell array AR : ${AR } expands to all the defined array elements, and ${#AR } expands to the number... (3 Replies)
Discussion started by: Clovis_Sangrail
3 Replies

10. Shell Programming and Scripting

Parse variables from C++ to shell

Hi All, #include <iostream> int main() { std::int foo = 34; system("mkdir /home/linuxUser/fooDir"); system("vi fooFile") system("write foo in fooFile") foo = 43; foo = read foo from fooFile; std::cout << "foo = " << foo ; } result should be foo = 34 can... (3 Replies)
Discussion started by: linuxUser_
3 Replies
Module::Build::Platform::VMS(3pm)			 Perl Programmers Reference Guide			 Module::Build::Platform::VMS(3pm)

NAME
Module::Build::Platform::VMS - Builder class for VMS platforms DESCRIPTION
This module inherits from "Module::Build::Base" and alters a few minor details of its functionality. Please see Module::Build for the general docs. Overridden Methods _set_defaults Change $self->{build_script} to 'Build.com' so @Build works. cull_args '@Build foo' on VMS will not preserve the case of 'foo'. Rather than forcing people to write '@Build "foo"' we'll dispatch case- insensitively. manpage_separator Use '__' instead of '::'. prefixify Prefixify taking into account VMS' filepath syntax. _quote_args Command-line arguments (but not the command itself) must be quoted to ensure case preservation. have_forkpipe There is no native fork(), so some constructs depending on it are not available. _backticks Override to ensure that we quote the arguments but not the command. find_command Local an executable program _maybe_command (override) Follows VMS naming conventions for executable files. If the name passed in doesn't exactly match an executable file, appends .Exe (or equivalent) to check for executable image, and .Com to check for DCL procedure. If this fails, checks directories in DCL$PATH and finally Sys$System: for an executable file having the name specified, with or without the .Exe-equivalent suffix. do_system Override to ensure that we quote the arguments but not the command. oneliner Override to ensure that we do not quote the command. _infer_xs_spec Inherit the standard version but tweak the library file name to be something Dynaloader can find. rscan_dir Inherit the standard version but remove dots at end of name. If the extended character set is in effect, do not remove dots from filenames with Unix path delimiters. dist_dir Inherit the standard version but replace embedded dots with underscores because a dot is the directory delimiter on VMS. man3page_name Inherit the standard version but chop the extra manpage delimiter off the front if there is one. The VMS version of splitdir('[.foo]') returns '', 'foo'. expand_test_dir Inherit the standard version but relativize the paths as the native glob() doesn't do that for us. _detildefy The home-grown glob() does not currently handle tildes, so provide limited support here. Expect only UNIX format file specifications for now. find_perl_interpreter On VMS, $^X returns the fully qualified absolute path including version number. It's logically impossible to improve on it for getting the perl we're currently running, and attempting to manipulate it is usually lossy. localize_file_path Convert the file path to the local syntax localize_dir_path Convert the directory path to the local syntax ACTION_clean The home-grown glob() expands a bit too aggressively when given a bare name, so default in a zero-length extension. AUTHOR
Michael G Schwern <schwern@pobox.com> Ken Williams <kwilliams@cpan.org> Craig A. Berry <craigberry@mac.com> SEE ALSO
perl(1), Module::Build(3), ExtUtils::MakeMaker(3) perl v5.18.2 2014-01-06 Module::Build::Platform::VMS(3pm)
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy