bash and Perl interaction questions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting bash and Perl interaction questions
# 1  
Old 10-11-2005
bash and Perl interaction questions

hi.

i´m working in bash and am trying to create a Perl daemon that controls bash´s behavior. this is actually in preparation for a later project i´ll be working on.

basically, i´m looking for a way to have the Perl daemon tell bash what to do. i already have a small daemon that simply prints to the screen after a given interval, but what i want to happen ideally is: say the user inputs ¨cd library¨ and hits enter, the Perl daemon should see that the directory is library, and subsequently tell bash to echo a few statements informing the user of what the directory is all about.

any tips? of course once this is done, this would open the doors to a great number of other possibilities. i´m just trying to take this first step.

thanks a lot everyone. Smilie
# 2  
Old 10-12-2005
no one?

i just need a way to execute bash commands from Perl, such that when Perl reads a bash environment variable, it can tell bash to echo something, for example.

Smilie
# 3  
Old 10-12-2005
check out shell and exec.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Technical questions on bash,mysql and pHp

1. bash -bash escape rules, esp. ',", -how to use Ctrl+R reverse cmd search with regex? 2. mysql -how to use grep in mysql 3. php -why !0 is not evaluated to true? what's its value -php getopt: what if there is duplicate in cmdline args (2 Replies)
Discussion started by: John_Peter
2 Replies

2. Shell Programming and Scripting

ksh vs perl strange interaction.

Hello everybody, I isolated an issue: please try the following script (under AIX) #!/usr/bin/ksh93 echo "Before Perl: \c" read line echo "|$line|" perl -e 'print "Perl invocation";' echo echo "After Perl: \c" read line echo "|$line|" On the first input, type Ctrl-D. It works... (13 Replies)
Discussion started by: jlovi
13 Replies

3. Shell Programming and Scripting

Bash Questions

I am writing a Bash script that needs to get part of the current directory path. Let's say the current directory is /cat/dog/bird/mouse/ant. I know that the part that I want is between "bird/" and "/ant". In this case, I would want to set a variable to "mouse". If the current directory were... (4 Replies)
Discussion started by: RickS
4 Replies

4. Shell Programming and Scripting

Bash Questions

Hello I have to do a program in Bash, need help because it does not go out for me and go enough time with this!! Five directories(boards of directors) that more occupy, arranged according to size. To measure the size of every directory(board of directors) there must not be included the size of... (2 Replies)
Discussion started by: danihj
2 Replies

5. Shell Programming and Scripting

Bash script questions for gurus

guys, I need a steer in the right direction for this issue. it would be great if anyone of you can help me out. i have a textfile where i want to swap the lines based on the user input. The textfile is looks like the #file 1 name TB #file 1 ID 1000 # #file for ID1 system1... (3 Replies)
Discussion started by: mayi
3 Replies

6. Shell Programming and Scripting

Perl newbie questions!

Hi, So I started to learn perl a few days ago, and I have some problems... One of my problems... #!C:\Perl64\bin\perl.exe -w use LWP::Simple; print "Content-Type: Text/Plain\n\n"; sub pagelinks { return @all = get($_) =~ /href\s*=\s*"?(+)/gis; } @a =... (5 Replies)
Discussion started by: byte1918
5 Replies

7. Shell Programming and Scripting

How to answer the Questions in Perl .

I need to write a script to telnet or ssh a device the execute some commands in device then copy the output in a file, I wrote the script but I faced one issue, when you execute some commands the device asked me a Question, for example : device # copy run tftp device # Source filename ? ... (3 Replies)
Discussion started by: DarkSoul
3 Replies

8. Shell Programming and Scripting

Perl questions - more

More questions for Perl on Windows (again I apologize its on windows... ) 1. How can I check free disk space on a drive in windows using perl command in a script? 2. How can I check processes running using perl command (as I would normally be able to see in task manager for example) 3. I... (7 Replies)
Discussion started by: frustrated1
7 Replies

9. Shell Programming and Scripting

perl questions

New to perl and a few questions - usually used to shell scripting but have to write a script to check a few things on windows server and need help.. 1. Check for file missing in sequence.. ie. list of file in directory as follows: file0001.txt file0002.txt file0004.txt file0005.txt... (7 Replies)
Discussion started by: frustrated1
7 Replies

10. Shell Programming and Scripting

chess perl program questions

Hello guys, While going over the book, I ran into this chess program and I have few questions 1) on line 40), why is not $chessboard-> ) ??? 40 unless (defined $chessboard->) { 2) 20 foreach my $i (reverse (0..7)) { #Row 1 #!/usr/bin/perl -w 2 # 3 # 4 5 ... (1 Reply)
Discussion started by: hankooknara
1 Replies
Login or Register to Ask a Question