Sponsored Content
Top Forums Shell Programming and Scripting perl as lanuage of shells in unix Post 30415 by auswipe on Tuesday 22nd of October 2002 12:31:24 AM
Old 10-22-2002
Re: perl as lanuage of shells in unix

Quote:
Originally posted by yls177
hi, do shells in unix understand the language of perl?
No. Perl understands Perl.

You will see in many perl scripts that the first line of code is often something along the lines of :

Code:
#!/usr/bin/perl

This tells the shell script to use the perl parser for the perl script.

Quote:
Originally posted by yls177

learning perl will make u a ultimate shell programmer?
thanks
No. While Perl does contain a lot of similiarities to shell scripting, it is in it's own little world. If you want to be an ultimate shell scripter, then you should pick a popular shells such as Korn Shell (ksh) (heartily endorsed by Perderabo) or Bourne Again Shell (bash) and have at it. There are many reference guides on the net to shell scripting.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Good Unix Shells ?

Hey Guys i am new to Unix and i have downlaoded Cygwin for Windows and deleted it. I was just wondering is there any good shells like that for windows that just as good thanks for your time ][ce (1 Reply)
Discussion started by: IceCold
1 Replies

2. Shell Programming and Scripting

Switching shells in UNIX Scripts

Solaris Newbie here to scripting in UNIX/SOLARIS. What I am looking to do is, once the script is executed, switch to /bin/bash shell and continue to execute the script. The problem I run into is once the script switches to the Bash shell, the script stops, and does not execute the... (2 Replies)
Discussion started by: Scoobiez
2 Replies

3. Shell Programming and Scripting

[PERL] Running unix commands within Perl Scripts

I understand that in order to run basic unix commands I would normally type at the prompt, I would have to use the following format system(ls -l); or exec(ls -l); But when I actually try to use the command, the script fails to compile and keeps telling me there is an error with this line. ... (1 Reply)
Discussion started by: userix
1 Replies

4. UNIX for Dummies Questions & Answers

How do I know what type of shells are available in my Unix system?

How do I know what type of shells are available in my Unix system? Are there a single command or environment variable that can let me find that out? Best regards, John Chan (7 Replies)
Discussion started by: shuhang2
7 Replies

5. UNIX for Dummies Questions & Answers

changing shells in unix (im using putty)

hi. im new here. im taking a UNIX OS class and im in need of some help how do i change my shell in UNIX? for homework i need to edit the tcshrc file (to include aliases) in my home directory but its not there. so i think switching shells will create the file. am i correct? I'm using PuTTy.... (1 Reply)
Discussion started by: alpha_centauri
1 Replies

6. Shell Programming and Scripting

ftp from windows to unix using a perl script on unix machine

i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies

7. Shell Programming and Scripting

"UNIX Shells By Example" CD Files

hello All, I just purchased a used copy of "UNIX Shells by Example" by Ellie Quigley. The CD is not in the back. I googled the world but the files dont seem to be available for download anywhere. Does anyone out there have them. It would be much appreciated if someone can email them to me. ... (1 Reply)
Discussion started by: tag0519
1 Replies

8. 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

9. UNIX for Dummies Questions & Answers

UNIX shells script to echo out the date value

I appreciate if someone answer this question for my learning purpose: Given a filename structure of a COUNTRY CODE, file type, date (YYYYMMDD) and two digit attempt number with an extension of ".dat", write a UNIX shells script to echo out the date value. Example: ... (1 Reply)
Discussion started by: shumail
1 Replies

10. Programming

UNIX shells scripting

Can someone help by advising hw to built myself strong on logic building in UNIX shell scripting. I find it very difficult Sent from my iPhone using Tapatalk (4 Replies)
Discussion started by: Vijaykannan T
4 Replies
CHSH(1) 							   User Commands							   CHSH(1)

NAME
chsh - change your login shell SYNOPSIS
chsh [-s shell] [-l] [-u] [-v] [username] DESCRIPTION
chsh is used to change your login shell. If a shell is not given on the command line, chsh prompts for one. chsh is used to change local entries only. Use ypchsh, lchsh or any other implementation for non-local entries. OPTIONS
-s, --shell shell Specify your login shell. -l, --list-shells Print the list of shells listed in /etc/shells and exit. -u, --help Print a usage message and exit. -v, --version Print version information and exit. VALID SHELLS
chsh will accept the full pathname of any executable file on the system. However, it will issue a warning if the shell is not listed in the /etc/shells file. On the other hand, it can also be configured such that it will only accept shells listed in this file, unless you are root. EXIT STATUS
Returns 0 if operation was successful, 1 if operation failed or command syntax was not valid. SEE ALSO
login(1), passwd(5), shells(5) AUTHOR
Salvatore Valente <svalente@mit.edu> AVAILABILITY
The chsh command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux July 2009 CHSH(1)
All times are GMT -4. The time now is 07:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy