Results 1 to 4 of 4
People reading the forums, lend me yer ears!
I would like to get, in example; this Bash command:
Code:
#!/bin/bash
mplayer jkl.flv
And make Perl do the same thing! Is ...
- 01-16-2009 #1
[SOLVED] Perl Acting Like Bash
People reading the forums, lend me yer ears!
I would like to get, in example; this Bash command:
Code:#!/bin/bash mplayer jkl.flv
And make Perl do the same thing! Is there a way to put Bash commands inside Perl?
If so, thus I ask this question once more!
- 01-16-2009 #2Linux User
- Join Date
- Jul 2007
- Location
- Greece
- Posts
- 277
I don't think you can use bash commands in perl. Correct me if I'm wrong.
- 01-16-2009 #3Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
Making a few assumptions, you are likely looking for system:
the perldoc program being a very useful tool for perl use:Code:perldoc -f system
One assumption I made is that you are referring to an external command as defined by:Code:perldoc perldoc
For example:Commands on Unix-like operating systems are either built-ins or external commands. The former are part of the shell. The latter consist of both executables, which are programs that have been written in a programming language (e.g., C, C++, Java or Python) and then compiled into a binary, and shell scripts.
-- What is a command? -- definition by The Linux Information Project (LINFO)
Would not make mplayer a csh command, but an external command because it is not a csh built-in.Code:#!/bin/csh mplayer jkl.flv
Best wishes ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 01-18-2009 #4
I've already found the answer.
system '/usr/bin/mplayer jkl.flv' will do the trick.
My Perl script is done and I can use it now!


