Sponsored Content
Top Forums Shell Programming and Scripting Use shell variable in perl command line Post 302864467 by jdilts on Wednesday 16th of October 2013 02:38:35 PM
Old 10-16-2013
Worked like a charm. Is there any decent documentation on using command line perl? Every time I google 'command line' and 'perl' together I get hits for passing arguments to a perl script.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script variable to read shell command

Solaris 10 Korn shell ksh, Hi there, I have figured out to get yesterday's date which is using the below command: TZ=GMT+24; date +%d-%b-%Y to get the format of 30-Sep-2008 and TZ=GMT+24; date +%Y%m%d to get the format of 20080930. I need this two format. In my perl script below I need... (4 Replies)
Discussion started by: bulkbiz
4 Replies

2. Shell Programming and Scripting

Insert a line including Variable & Carriage Return / sed command as Variable

I want to instert Category:XXXXX into the 2. line something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong: sed "2i\\${n}Category:$cat\n" Sample: Titel Blahh Blahh abllk sdhsd sjdhf Blahh Blah Blahh Blahh Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies

3. Shell Programming and Scripting

perl/unix: script in command line works but not in perl

so in unix this command works works and shows me a list of directories find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt but when i try running a perl script to run this command my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies

4. Shell Programming and Scripting

Passing perl variable to shell command

Can we pass perl variable to shell commands. If yes, please give some example. (2 Replies)
Discussion started by: Anjan1
2 Replies

5. Shell Programming and Scripting

PERL or SHELL Scrript to search in Directories by taking line by line from a text file

Unix box server version *********** >uname -r B.11.00 >echo $SHELL /usr/bin/ksh --> in this server, I have the path like /IMbuild/dev/im0serv1 ---> in that directory I have the folders startup(.jsp files nearly 100 jsp's ) and scripts(contains .js files nearly 100 files) ... (9 Replies)
Discussion started by: pasam
9 Replies

6. Shell Programming and Scripting

Embeded shell variable in command line

Hello, I know this is a situation about the single quote and double literal, but I could not figure out after many search. I need to loop through thousands of different BACs sequencing to optimize kmer individually. IN=/PATH/TO/INPUT/FILES for sample in S{01..1096} do run_program... (9 Replies)
Discussion started by: yifangt
9 Replies

7. Shell Programming and Scripting

How to read a two files, line by line in UNIX script and how to assign shell variable to awk ..?

Input are file and file1 file contains store.bal product.bal category.bal admin.bal file1 contains flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0 store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies

8. Shell Programming and Scripting

Usage of shell variable in perl command

Hi, I have a shell script, In which i have variable "var1" and some perl command inside shell script. export var1='coep -n rst-a2p-hinje.vci.all.com -c' perl -pi -e 's/^/coep -n rst-a2p-hinje.vci.all.com -c /' command.txt currently I am adding value of var1 in command.txt file by... (2 Replies)
Discussion started by: rakeshtomar82
2 Replies

9. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies

10. Shell Programming and Scripting

How to read the output of a command line by line and pass it as a variable?

Hi, I have some 2000 names in a table like below. Java Oracle/SQL ANSI SQL SQL,DWH,DB DB&Java And by using for loop in my code i am able to get a single word but if there is any special character or space then it is considering as a next line. I have to execute the below queries in... (10 Replies)
Discussion started by: Samah
10 Replies
Test::Valgrind::Command::Perl(3pm)			User Contributed Perl Documentation			Test::Valgrind::Command::Perl(3pm)

NAME
Test::Valgrind::Command::Perl - A Test::Valgrind command that invokes perl. VERSION
Version 1.13 DESCRIPTION
This command is the base for all "perl"-based commands. It handles the suppression generation and sets the main command-line flags. METHODS
This class inherits Test::Valgrind::Command. "new perl => $^X, inc => @INC, taint_mode => $taint_mode, ..." The package constructor, which takes several options : o The "perl" option specifies which "perl" executable will run the arugment list given in "args". Defaults to $^X. o "inc" is a reference to an array of paths that will be passed as "-I" to the invoked command. Defaults to @INC. o $taint_mode is a boolean that specifies if the script should be run under taint mode. Defaults to false. Other arguments are passed straight to "Test::Valgrind::Command->new". "perl" Read-only accessor for the "perl" option. "inc" Read-only accessor for the "inc" option. "taint_mode" Read-only accessor for the "taint_mode" option. "env $session" Returns an Env::Sanctify object that sets the environment variables "PERL_DESTRUCT_LEVEL" to 3 and "PERL_DL_NONLAZY" to 1 during the run. SEE ALSO
Test::Valgrind, Test::Valgrind::Command. Env::Sanctify. AUTHOR
Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>. You can contact me by mail or on "irc.perl.org" (vincent). BUGS
Please report any bugs or feature requests to "bug-test-valgrind at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::Valgrind::Command::Perl COPYRIGHT &; LICENSE Copyright 2009,2010,2011 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-08-25 Test::Valgrind::Command::Perl(3pm)
All times are GMT -4. The time now is 02:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy