Saving Perl scrpits in a UNIX Shell


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Saving Perl scrpits in a UNIX Shell
# 1  
Old 06-18-2001
Saving Perl scrpits in a UNIX Shell

Hey, i am really new to Perl and UNIX, all i need to know how to know how to save scripts in UNIX? after i get done writing the script i type the command chmod 755 filename, but it I think the shell thinks that is a part of the script, i dont know if i am supposed to type in a save command or somethign before i type the chmod?
# 2  
Old 06-19-2001
Which tool you using to write the script?

if it is cat press 'Ctrl+d'
vi press 'Esc' then type :wq
pico 'Ctrl+x'
emacs 'Ctrl+x'

then chmod +x 755

to run the script:

./scriptname




HTH
# 3  
Old 06-19-2001
im using pico, i already figured it out though, thanx
# 4  
Old 06-21-2001
What I would do is open up vi and hit escape a couple of times, then type :r and the name of the hopefully saved perl script. Then hit enter. Press colon and type wq. Then do chmod 700 filename. After that simply type in the name of the script. I think that will work.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem saving return value of subroutine in perl

Hi all, I have this code #This program read the triplets from file named "data" into #an array of array. use strict; use warnings; use Data::Dumper; use Graph; use Graph::Subgraph; my @S; while (<>) { push @S, ; } print "-----TRIPLETS-------\n"; print Dumper \@S; #Make... (6 Replies)
Discussion started by: rushadrena
6 Replies

2. Shell Programming and Scripting

shell script for saving oracle database records in variable

i want to retrieve value in each column of each row in sql plus and save them into array variable and echo the value in array variable (2 Replies)
Discussion started by: ramish
2 Replies

3. Shell Programming and Scripting

Need to access Oracle DB with shell/perl script in Unix

Hi, We need to access Oracle DB with shell/perl script in Unix. Is Oracle client needed in Unix for this. I have seen threads which tell abt using SQL plus to access Oracle tables. Can we access DB without SQL PLus installation using scripts in UNix like we access DB using jar files in Java .... (1 Reply)
Discussion started by: justinacc
1 Replies

4. Shell Programming and Scripting

Outputfile is not saving - Perl solved

Dear all I have this perl script where it also linked R script but the outputfile (anchorresult.temp)is also disappearing after I got the R figure. Do you guys know how to preserve the file #!/usr/bin/perl $anchorfile=&QQQ("Anchor file (include the path):"); $anchortype=&QQQ("Anchor type... (0 Replies)
Discussion started by: quincyjones
0 Replies

5. Shell Programming and Scripting

Linux/Unix shell scripting vs Perl

Hi, I have general question: i have good working Perl script with .pl extension, and now I have to migrate all to another Linux box, and I was told that I can use only shell scripting, so I'm not sure how different those two things are, will it work without any changes . Is there anything smart I... (6 Replies)
Discussion started by: trento17
6 Replies

6. UNIX for Dummies Questions & Answers

Editing & Saving using shell script

Hi, OS: Unix, linux, hp-unix (all unix flavours) Iam trying to change some string values, special characters or otherwise in a file. As of now, i go using vi <filename>, open the file and do the edit manually and save it. Is it possible to write a shell script so that i just run the script... (4 Replies)
Discussion started by: kenkanya
4 Replies

7. Shell Programming and Scripting

saving values from awk expression into shell array

hi i am trying to save the values i extract from a file with the help of awk in a bash shell array. i have: exec 10<file2 while read LINE <&10; do ARRAY1=$(awk '{print $1}' file2) ((count++)) done echo ${ARRAY1} it prints just blank lines. file1 has two columns and i... (4 Replies)
Discussion started by: npatwardhan
4 Replies

8. Shell Programming and Scripting

Saving output from awk into a perl variable

How would I pass awk output to a perl variable? For example, I want to save the value in the 4th column into the variable called test. My best guess is something as follow, but I am sure this isn't correct. $test = system("awk '/NUMBER/{print \$4}' $_"); (8 Replies)
Discussion started by: userix
8 Replies

9. UNIX for Dummies Questions & Answers

saving from unix into pc

hi, i access unix through secure shell (SSH) from my pc running on windows. Can i save files from unix directly into windows-run pc?. e.g. vi files into notepad??? thanks alot, -a (6 Replies)
Discussion started by: alikun
6 Replies

10. UNIX for Advanced & Expert Users

Saving of UNIX based e-mail on to local disks

Dear friends, Someone please let me know how to store e-mail on local hard disk or floppy disks. I am using UNIX based PINE e-mail programme and the copy of this mail I wanted to store it in my local disks. Thanks in advance. Regards, Rajan (4 Replies)
Discussion started by: rajan9
4 Replies
Login or Register to Ask a Question