Sponsored Content
Top Forums Shell Programming and Scripting Run the command inside perl script Post 302205059 by spirtle on Friday 13th of June 2008 10:01:41 AM
Old 06-13-2008
Take the bit inside the single quotes, paste it into a file, and run perl with
perl -p file FIA.txt
The -p flag implicitly adds some extra functionality -- see man perlrun for details.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

2. Shell Programming and Scripting

Run perl script, with command-line options

Hello everyone, I have a perl script which takes various command line options from user like : test.pl -i <input_file> -o <output_file> -d <value> -c <value> Now I have multiple input files in a directory: <input_file_1> <input_file_2> <input_file_3> <input_file_4> ..... .... ...... (6 Replies)
Discussion started by: ad23
6 Replies

3. Programming

Executing a awk command inside perl script --

Hello experts I want to execute a awk command, which reads from txt files and sums the numbers from the first column for those listed only inside a <init> block -- The awk command is like awk '/<\/?init>/{x = !x}x{a++}x && a > 2{sum+=$1}END{printf"%E" "\n", sum} So, I want to execute... (2 Replies)
Discussion started by: Alkass
2 Replies

4. Shell Programming and Scripting

Run perl command in script[solved]

Hi all, When I put the Perl command in a script, I got error. system("perl -pi -e 's@words@words@g' myFile"); The error is: Unrecognized character \x8A; marked by <-- HERE after دت مد�<-- HERE near column 15 at -e line 1. Thanks in advance. ---------- Post updated at 06:30 AM... (0 Replies)
Discussion started by: Lham
0 Replies

5. Shell Programming and Scripting

Bash- Command run from script does not pass full parameters with spaces inside

There's a JavaScript file that I call from command line (there's a framework) like so: ./RunDiag.js param1:'string one here' param2:'string two here' I have a shell script where I invoke the above command. I can run it in a script as simple as this #!/bin/bash stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies

6. Shell Programming and Scripting

Run bash command inside zsh script

Hi, I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh). I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory " eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies

7. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

8. Shell Programming and Scripting

Listen sharp time to run a command inside a script

Hello, Just wondered if there is any possibility to run a command at sharp time inside a script in linux. My question is not about crontab Example: #!/bin/bash cd /home/database for i in * do command 1 if time is 19:00, day is Monday then run command2 if time is 20:00, day is... (10 Replies)
Discussion started by: baris35
10 Replies

9. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

10. UNIX for Advanced & Expert Users

Run awk command inside ssh

I am trying to run an awk command inside of ssh and it is not working. These are AIX servers. for i in `cat servers`; do ssh $i "/bin/hostname; df -g | awk '/dev/ && $4+0 > 70'"; done server1 server2 server3 server4 I also tried these two methods and they did not work. It just seemed... (5 Replies)
Discussion started by: cokedude
5 Replies
SQL::Translator::Schema::Object(3pm)			User Contributed Perl Documentation		      SQL::Translator::Schema::Object(3pm)

NAME
SQL::Translator::Schema::Object - Base class SQL::Translator Schema objects. SYNOPSIS
DESCSIPTION
Base class for Schema objects. Sub classes Class::Base and adds the following extra functionality. Construction Derived classes should declare their attributes using the "_attributes" method. They can then inherit the "init" method from here which will call accessors of the same name for any values given in the hash passed to "new". Note that you will have to impliment the accessors your self and we expect perl style methods; call with no args to get and with arg to set. e.g. If we setup our class as follows; package SQL::Translator::Schema::Table; use base qw/SQL::Translator::Schema::Object/; __PACKAGE__->_attributes( qw/schema name/ ); sub name { ... } sub schema { ... } Then we can construct it with my $table = SQL::Translator::Schema::Table->new( schema => $schema, name => 'foo', ); and init will call "$table->name("foo")" and "$table->schema($schema)" to set it up. Any undefined args will be ignored. Multiple calls to "_attributes" are cumulative and sub classes will inherit their parents attribute names. This is currently experimental, but will hopefull go on to form an introspection API for the Schema objects. Global Attributes The following attributes are defined here, therefore all schema objects will have them. extra Get or set the objects "extra" attibutes (e.g., "ZEROFILL" for MySQL fields). Call with no args to get all the extra data. Call with a single name arg to get the value of the named extra attribute, returned as a scalar. Call with a hash or hashref to set extra attributes. Returns a hash or a hashref. $field->extra( qualifier => 'ZEROFILL' ); $qualifier = $field->extra('qualifier'); %extra = $field->extra; $extra = $field->extra; remove_extra "extra" can only be used to get or set "extra" attributes but not to remove some. Call with no args to remove all extra attributes that have been set before. Call with a list of key names to remove certain extra attributes only. # remove all extra attributes $field->remove_extra(); # remove timezone and locale attributes only $field->remove_extra(qw/timezone locale/); equals Determines if this object is the same as another. my $isIdentical = $object1->equals( $object2 ); SEE ALSO
TODO
BUGS
AUTHOR
Ken Youens-Clark <kclark@cpan.org>, Mark Addison <mark.addison@itn.co.uk>. perl v5.14.2 2012-01-20 SQL::Translator::Schema::Object(3pm)
All times are GMT -4. The time now is 05:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy