10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dears,
I want to print filename and count of each file in perl but failing to implement.
`find $srcFolder -maxdepth 1 -type f -name "*$workDate*$fileExt" -exec sh -c ' && printf "$workDate|%s|%s\n" "$(wc -l<"$0")" *$workDate*$fileExt' {} \ >> /Sadique/filelog.out \\; 2> /dev/null`;
... (2 Replies)
Discussion started by: sadique.manzar
2 Replies
2. Shell Programming and Scripting
I am trying to make a simple perl program that reads 20 characters upstream from the codon ATG in a given sequence. The following is what I have. I just dont know how to make the program read 20 characters upstream from the ATG codon.
print "\nThis program will read 20 characters upstream... (1 Reply)
Discussion started by: patiencenpray
1 Replies
3. Programming
Hi,
i am very beginer to perl, I am reading one xml file and i am creating hash table for that file. i written code like this
#!/usr/bin/perl
use warnings;
use strict;
use XML::LibXML::Reader;
#Reading XML with a pull parser
my $file;
open( $file, 'formal.xml');
my $reader =... (8 Replies)
Discussion started by: veerubiji
8 Replies
4. Programming
I am having a text file with
Vivek 50
Ram 34
Hulk 45
Vivek 23
Ram 23
Vivek 55
Now I need a perl script to display the fields of 1st column & the 2nd column with summation (& avoid the duplicates).
Vivek 128
Ram 57
hulk 45
Plz help me... (1 Reply)
Discussion started by: gameboy87
1 Replies
5. Shell Programming and Scripting
Hi, everyone!!
i am new to perl programming.. plz help me.
#!C:/perl/bin
use warnings;
use strict;
use Text::CSV_XS;
my @rows = "";
my $row;
my $count;
my $fh;
my @fields = "";
my $csv = Text::CSV_XS->new ({binary =>1}) or
die "cannot use CSV:" .Text::CSV->error_diag ();
open... (3 Replies)
Discussion started by: kvth
3 Replies
6. Shell Programming and Scripting
Can someone please tell me what the big deal about perl is?
i have been doing shell programming for quite a number of years and I have to say, there's very little if any thing that I can't do in shell programming. i just need to investigate how to do it.
so, my question is, does deep... (1 Reply)
Discussion started by: SkySmart
1 Replies
7. UNIX for Dummies Questions & Answers
I need a small and simple clarification...
Can someone tell me whether PERL is a programming language or not.
Also, can shell scripts also considered as programming language or not.
Also, please tell me the exact difference between programming language and scripting.
Please help.... (3 Replies)
Discussion started by: Anjan1
3 Replies
8. Programming
use strict;
print "Enter last 4 digits of phone number:";
chomp(my $number=<>);
die "Invalid number: '$number'\n" unless $number=~/^\d{4}$/;
my @d=split(undef,$number);
my %map={
2=>"",
3=>"",
4=>"",
5=>"",
6=>"",
7=>"",
8=>"",
9=>"",
};
my $r=$map{$d}.$map{$d}.$map{$d}.$map{$d};... (1 Reply)
Discussion started by: tturn33
1 Replies
9. Shell Programming and Scripting
Hi,
I am extracting SQL queries into a file and the file is as follows
*********************************************************
select BatchKey ,restartStatus ,batchContextBuffer ,batchPgmId ,StartKey ,
EndKey ,Mcbatchcontrol_ver
from
qsecminload.Mcbatchcontrol_t where RefId = :1 ... (5 Replies)
Discussion started by: sagarbsa
5 Replies
10. UNIX for Dummies Questions & Answers
Hi friends,
What are the possible ways to connect to DB2 database from Perl (on unix).
I need to connect to DB2 and get records for further processing. Can you please suggest the best possible way. I heard about DBI/DBD, if you have some sample scripts please post them too.
Thanks in advance. (3 Replies)
Discussion started by: satguyz
3 Replies
PEGASUS-CONFIG(1) PEGASUS-CONFIG(1)
NAME
pegasus-config - The authority for where parts of the Pegasus system exists on the filesystem. pegasus-config can be used to find libraries
such as the DAX generators.
SYNOPSIS
pegasus-config [-h] [--help] [-V] [--version] [--noeoln]
[--perl-dump] [--perl-hash] [--python-dump] [--sh-dump]
[--bin] [--conf] [--java] [--perl] [--python]
[--python-externals] [--schema] [--classpath]
[--local-site] [--full-local]
DESCRIPTION
pegasus-config is used to find locations of Pegasus system components. The tool is used internally in Pegasus and by users who need to find
paths for DAX generator libraries and schemas.
OPTIONS
-h, --help
Prints help and exits.
-V, --version
Prints Pegasus version information
--perl-dump
Dumps all settings in perl format as separate variables.
--perl-hash
Dumps all settings in perl format as single perl hash.
--python-dump
Dumps all settings in python format.
--sh-dump
Dumps all settings in shell format.
--bin
Print the directory containing Pegasus binaries.
--conf
Print the directory containing configuration files.
--java
Print the directory containing the jars.
--perl
Print the directory to include into your PERL5LIB.
--python
Print the directory to include into your PYTHONLIB.
--python-externals
Print the directory to the external Python libraries.
--schema
Print the directory containing schemas.
--classpath
Builds a classpath containing the Pegasus jars.
--noeoln
Do not produce a end-of-line after output. This is useful when being called from non-shell backticks in scripts. However, order is
important for this option: If you intend to use it, specify it first.
--local-site [d]
Create a site catalog entry for site "local". This is only an XML snippet without root element nor XML headers. The optional argument
"d" points to the mount point to use. If not specified, defaults to the user's $HOME directory.
--full-local [d]
Create a complete site catalog with only site "local". The an XML snippet without root element nor XML headers. The optional argument
"d" points to the mount point to use. If not specified, defaults to the user's $HOME directory.
EXAMPLE
To set the PYTHONPATH variable in your shell for using the Python DAX API:
export PYTHONPATH=`pegasus-config --python`
To set the same path inside Python:
config = subprocess.Popen("pegasus-config --python-dump", stdout=subprocess.PIPE, shell=True).communicate()[0]
exec config
To set the PERL5LIB variable in your shell for using the Perl DAX API:
export PERL5LIB=`pegasus-config --perl`
To set the same path inside Perl:
eval `pegasus-config --perl-dump`;
die("Unable to eval pegasus-config output: $@") if $@;
will set variables a number of lexically local-scoped my variables with prefix "pegasus_" and expand Perl's search path for this script.
Alternatively, you can fail early and collect all Pegasus-related variables into a single global %pegasus variable for convenience:
BEGIN {
eval `pegasus-config --perl-hash`;
die("Unable to eval pegasus-config output: $@") if $@;
}
AUTHOR
Pegasus Team http://pegasus.isi.edu
05/24/2012 PEGASUS-CONFIG(1)