Sponsored Content
Top Forums Shell Programming and Scripting Need help to understand this small script Post 302898919 by chacko193 on Friday 25th of April 2014 02:53:51 AM
Old 04-25-2014
Yup, basically thats what it does.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help wanted to understand MQ script

hi , i am writing a script to copy the MQ messages from onw queue to another. The following i got from one site, but i di not understand , can anyone explain. /root/scripts/sap/q -m$Q_MANAGER -i$Q_NAME_SRC_1 -F/logs/mq/MQ_COPYdump_$Q_NAME_SRC_1.$$ /root/scripts/sap/q -m$Q_MANAGER... (0 Replies)
Discussion started by: Satyak
0 Replies

2. Shell Programming and Scripting

Can't understand the script

I am relatively new to Shell Scripting. I can't understand the following two scripts. Can someone please spare a minute to explain? 1) content s of file a are (021) 654-1234 sed 's/(//g;s/)//g;s/ /-/g' a 021-654-1234 2)cut -d: -f1,3,7 /etc/passwd |sort -t: +1n gives error (3 Replies)
Discussion started by: shahdharmit
3 Replies

3. Shell Programming and Scripting

Help to understand the script

Hi All; Is there anybody can explain this script please? trap 'C_logmsg "F" "CNTL/c OS signal trapped, Script ${G_SCRIPTNAME] terminated"; exit 1' 2 trap 'C_logmsg "F" "Kill Job Event sent from the Console, Script ${G_SCRIPTNAME] terminated"; exit 1' 15 (3 Replies)
Discussion started by: thankbe
3 Replies

4. Shell Programming and Scripting

Help me understand the Perl script..

#!/usr/bin/perl use strict; use warnings; print "Demo of array slicing \n"; my @abc="a b c d e f g h i j k l m n o p q r s t u v w x y z"; my @a=@abc; my @random=@abc; my @comp=@abc; my @comp1=(@abc,"Hello",@abc); print "abc is @abc \n"; print "a is @a \n"; print "random is @random \n";... (1 Reply)
Discussion started by: dnam9917
1 Replies

5. Shell Programming and Scripting

Need small help to understand algorithm

Hi! all I am reading one research paper in that I found one peak detection algorithm, I am just trying to understand how it works please anyone help me to convert algorithm to awk as I am not able to understand, here I am attaching that paper also, please help me to understand this logic (Page... (1 Reply)
Discussion started by: Akshay Hegde
1 Replies

6. Shell Programming and Scripting

Help to understand a script

Hello world! Can someone please explain me how this code works? I'ts supposed to find words in a dictionary and show the anagrams of the words. { part = word2key($1) data = $1 } function word2key(word, a, i, x, result) { x = split(word, a, "") asort(a) ... (1 Reply)
Discussion started by: jose2802
1 Replies

7. Shell Programming and Scripting

Can't understand script output

New to korn shel1 and having an issue. The following is suppose to read the parameter values from files in a source directory and then pass them on to a log file in a different directory, The ArchiveTracker scripts is suppose to call the parameterreader script to exact the parameter values and... (3 Replies)
Discussion started by: bayouprophet
3 Replies

8. Shell Programming and Scripting

Need help to understand the below shell script

Please help me to understand the below 3 lines of code.execute shell in jenkins 1)APP_IP=$( docker inspect --format '{{ .NetworkSettings.Networks.'"$DOCKER_NETWORK_NAME"'.IPAddress }}' ${PROJECT_NAME_KEY}"-CI" ) 2)HOST_WORKSPACE=$(echo ${WORKSPACE} | sed... (1 Reply)
Discussion started by: naresh85
1 Replies

9. UNIX for Beginners Questions & Answers

Help me understand this script

#!/bin/awk -f BEGIN {i=1;file="modified.txt"} { if ($0 !~ /^DS:/) {print $0 >> file} else { if ($0 ~ /^DS:/) {print "DS: ",i >> file;if (i==8) {i=1} else {i++}}; } } END {gzip file} Can someone explain to me how this above script works, I got it from a friend but not able... (3 Replies)
Discussion started by: Kamesh G
3 Replies
MooseX::Types::Perl(3pm)				User Contributed Perl Documentation				  MooseX::Types::Perl(3pm)

NAME
MooseX::Types::Perl - Moose types that check against Perl syntax VERSION
version 0.101341 SYNOPSIS
use MooseX::Types::Perl qw( DistName ModuleName PackageName Identifier SafeIdentifier LaxVersionStr StrictVersionStr VersionObject ); DESCRIPTION
This library provides Moose types for checking things (mostly strings) against syntax that is, or is a reasonable subset of, Perl syntax. TYPES
ModuleName PackageName These types are identical, and expect a string that could be a package or module name. That's basically a bunch of identifiers stuck together with double-colons. One key quirk is that parts of the package name after the first may begin with digits. The use of an apostrophe as a package separator is not permitted. DistName The DistName type checks for a string like "MooseX-Types-Perl", the sort of thing used to name CPAN distributions. In general, it's like the more familiar ModuleName, but with hyphens instead of double-colons. In reality, a few distribution names may not match this pattern -- most famously, "CGI.pm" is the name of the distribution that contains CGI. These exceptions are few and far between, and deciding what a "LaxDistName" type would look like has not seemed worth it, yet. Identifier An Identifier is something that could be used as a variable name. Generally, it's a bunch of alphanumeric characters not starting with a digit. Although Perl identifiers may contain non-ASCII characters in some circumstances, this type does not allow it. A "UnicodeIdentifier" type may be added in the future. SafeIdentifier SafeIdentifiers are just like Identifiers, but omit the single-letter variables underscore, a, and b, as these have special significance. LaxVersionStr StrictVersionStr Lax and strict version strings use the is_lax and is_strict methods from "version" to check if the given string would be a valid lax or strict version. version::Internals covers the details but basically: lax versions are everything you may do, and strict omit many of the usages best avoided. VersionObject Just for good measure, this type is included to check if a value is a version object. Coercions from LaxVersionStr (and thus StrictVersionStr) are provided. AUTHOR
Ricardo SIGNES <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-12-23 MooseX::Types::Perl(3pm)
All times are GMT -4. The time now is 04:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy