Perl script for taking inputs from one script and storing them into a document.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl script for taking inputs from one script and storing them into a document.
# 1  
Old 06-27-2011
Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help.

Thanks.Smilie
# 2  
Old 06-27-2011
Code:
perlscript >temporary_document

# 3  
Old 06-27-2011
It's not working:

$ blc.pl >Test
bash: blc.pl: command not found
# 4  
Old 06-27-2011
Probably you may missed the shebang line ( perl interpreter location ) in your perl program. add the line and the try to execute the perl file
# 5  
Old 06-28-2011
Quote:
Originally Posted by k_manimuthu
Probably you may missed the shebang line ( perl interpreter location ) in your perl program. add the line and the try to execute the perl file


seems like it's working now but can anybody tell me where the temporary file will be created?

---------- Post updated at 11:53 AM ---------- Previous update was at 11:52 AM ----------

i already tried looking in the current dir and tmp dir but could not find it....

---------- Post updated at 04:22 PM ---------- Previous update was at 11:53 AM ----------

Quote:
Originally Posted by ctsgnb
Code:
perlscript >temporary_document

Hi,

Can you please tell me where the file created by the above mentioned command is stored?
# 6  
Old 06-28-2011
Eh, in the current working directory, you should probably read up on shell redirection to understand more about how this is works.
# 7  
Old 06-28-2011
Quote:
Originally Posted by xtatic

i already tried looking in the current dir and tmp dir but could not find it....

---------- Post updated at 04:22 PM ---------- Previous update was at 11:53 AM ----------

Eh, in the current working directory, you should probably read up on shell redirection to understand more about how this is works.

i mentioned in my last post that i could not find it in the current working directory. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Shell Script to Remove MongoDB Document-Based on Many inputs

Here I am in a position to write a Unix Shell script(.sh) to remove MongoDB collection documents. I know how to remove based on a condition like below and it works for me. eval 'db.Collection.remove({TimeStamp:{$lte: "'$var'"}}) But I need to change the remove statement based on a new parameter... (1 Reply)
Discussion started by: senthilmadhanT
1 Replies

2. Shell Programming and Scripting

Script to cp files that user inputs

Need a bash script that will ask the user: Which Files Would you like to copy? Then the user would input the filenames (space seperated, all lowercase) The script would then cp each file to /data/backup/ and also wc the files to std output. (to see how many lines each file has) Should go... (5 Replies)
Discussion started by: ajp7701
5 Replies

3. Shell Programming and Scripting

Taking inputs for awk

Hi, i want to print 2nd column value with the below script. I need to take input of the string i need to search in that file and file name. How can i take these two as inputs? using read command? Getting error for below script. echo "enter SID" read SID echo "enter filename" read filename... (8 Replies)
Discussion started by: sam_bd
8 Replies

4. Shell Programming and Scripting

Storing the Linux command output to an array in perl script

Hi I am trying to store the output of a command into an array in perl script. I am able to store but the problem is i am unable to print the array line with one line space. i mean i inserted the \n in loop ...but not getting the result. I have written like this #!/usr/bin/perl @a =... (2 Replies)
Discussion started by: kumar85shiv
2 Replies

5. Shell Programming and Scripting

How to provide auto inputs for a sub-script within a script?

Hi All, I am writing a shell script. #!/bin/bash cat /etc/hosts mkdir -p /var/tmp mount 113.123.35.37:/vol/vol615/syb /var/tmp In above script I am trying to add below predefined script/command (/var/tmp/db_tools) This command in turn ask for user input, which will be always option... (17 Replies)
Discussion started by: madhur.baharani
17 Replies

6. Shell Programming and Scripting

Taking inputs on prompt

need a help to get a script: bash # ./xx.sh >> count 567 script will run the xx.sh and it will go to >> then run "count" will get the result "567" and print it (7 Replies)
Discussion started by: Aditya.Gurgaon
7 Replies

7. Shell Programming and Scripting

Storing user inputs into a file

Hi, Am trying to store the user inputs into a file, but the below code will store only the first line of the values. I need to store all the user input values which may contain one or more lines. Thanks in advance. echo "please enter file names"; read name; echo $name>/tmp/test (11 Replies)
Discussion started by: rogerben
11 Replies

8. Shell Programming and Scripting

need inputs on how i can change my script to reduce amount of time the script takes

HI , I have a list1 which consists of data that i have to search and a list2 which has the files that need to be searched .So basically i am using list1 on list2 to see if list1 data is present if found replace it .I have written the code using foreach loop for each list .This is taking the... (1 Reply)
Discussion started by: madhul2002
1 Replies

9. Shell Programming and Scripting

use several inputs as arguments in my script

Hi there, It's pretty hard for me to explain my problem because I'm affraid I'm not using the correct vocabulary. So let me describe the situation. I wrote a script that has one argument. It works like this: ~$ cat /usr/local/bin/squote echo "$@" | sed 's/'\''/'\''\\'\'\''/g; s/.*/'\''&'\''/g'... (2 Replies)
Discussion started by: chebarbudo
2 Replies

10. Shell Programming and Scripting

here document to automate perl script that call script

I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl subscript.pl) call, input is no longer entered into this subscript. here is my script $ cat test.sh #ksh for testcase do program <<-EOF | tee -a funcscnlog.log y... (3 Replies)
Discussion started by: hogger84
3 Replies
Login or Register to Ask a Question