LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-13-2006, 06:46 AM   #1
indu.a
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Smile to change the directory using a perl script in linux kernel


Hello,

I want to change the directory using a perl script inside the linux shell. Is there any way I can do it?

Ex : I want to execute a command from a perl script in linux. I would do it as :

print `iwconfig`;

How would I change the directory ( say /root/lib/perl ) using perl script?

Thanks,
Indu
 
Old 11-13-2006, 07:14 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
use chdir();
 
Old 11-14-2006, 10:00 PM   #3
indu.a
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I will try this and let you know. Thanks anyway.
 
Old 11-15-2006, 03:22 AM   #4
indu.a
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
This didnt work out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change directory in a shell script? jdupre Linux - Newbie 13 06-25-2015 05:03 AM
Looking for a Perl/php script to change IP/NM/GW/DNS1/DNS2 ... ccadic Linux - Networking 2 05-18-2011 03:06 PM
Script to change directory gudum35 Linux - General 5 05-31-2006 03:43 PM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
script to change directory trout21 Linux - Newbie 9 02-17-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration