Sponsored Content
Top Forums Shell Programming and Scripting Run the command inside perl script Post 302205038 by vinay123 on Friday 13th of June 2008 08:52:17 AM
Old 06-13-2008
Run the command inside perl script

I have a command which will run fine in a unix command prompt. Can you tell how to interprete this command inside perl script......

The command is :
perl -pe 's/(\|333\}.*)\}$/$1|1.6}/' FIA.txt

This will search for the number 333 and appends 1.6 at the end of that line....
MNG={{ABC|fdb|222}=12.0|1.3|1.5}
MNG={{DEF|dfg|333}=11.0|0|0}
MNG={{FGH|fcv|444}=4.0|7.0|1.5}
 

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
CUBRID_SEQ_PUT(3)							 1							 CUBRID_SEQ_PUT(3)

cubrid_seq_put - Update the element value of sequence type column using OID

SYNOPSIS
bool cubrid_seq_put (resource $conn_identifier, string $oid, string $attr_name, int $index, string $seq_element) DESCRIPTION
The cubrid_seq_put(3) function is used to update the content of the requested element in a sequent type attribute using OID. PARAMETERS
o $conn_identifier -Connection identifier. o $oid -OID of the instance you want to work with. o $attr_name -Name of the attribute that you want to update an element. o $index -Index (1-based) of the element that you want to update. o $seq_element -New content that you want to use for the update. RETURN VALUES
TRUE, when process is successful. FALSE, when process is unsuccessful. EXAMPLES
Example #1 cubrid_seq_put(3) example <?php $conn = cubrid_connect("localhost", 33000, "demodb", "dba"); @cubrid_execute($conn, "DROP TABLE foo"); cubrid_execute($conn, "CREATE TABLE foo(a int AUTO_INCREMENT, b set(int), c sequence(int), d char(10))"); cubrid_execute($conn, "INSERT INTO foo(a, b, c, d) VALUES(1, {1,2,3}, {11,22,33,333}, 'a')"); $req = cubrid_execute($conn, "SELECT * FROM foo", CUBRID_INCLUDE_OID); cubrid_move_cursor($req, 1, CUBRID_CURSOR_FIRST); $oid = cubrid_current_oid($req); $attr = cubrid_col_get($conn, $oid, "c"); var_dump($attr); cubrid_seq_put($conn, $oid, "c", 1, "111"); $attr = cubrid_col_get($conn, $oid, "c"); var_dump($attr); cubrid_close_request($req); cubrid_disconnect($conn); ?> The above example will output: array(4) { [0]=> string(2) "11" [1]=> string(2) "22" [2]=> string(2) "33" [3]=> string(3) "333" } array(4) { [0]=> string(3) "111" [1]=> string(2) "22" [2]=> string(2) "33" [3]=> string(3) "333" } SEE ALSO
cubrid_seq_drop(3), cubrid_seq_insert(3). PHP Documentation Group CUBRID_SEQ_PUT(3)
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy