Sponsored Content
Full Discussion: Command doesn't execute
Top Forums Shell Programming and Scripting Command doesn't execute Post 302494276 by azrael2000 on Sunday 6th of February 2011 04:36:42 PM
Old 02-06-2011
Command doesn't execute

Hi All.

Little mystery here. I've been teaching myself perl, and I want to execute regular linux / unix commands i.e. cd .. , cd /etc and have been using the command(s)

execute ("cd ..");
or
system ("cd ..");

I don't get any error messages, even when I do a debug, but for some reason even this doesn't work.

Here is the super-simple code I am using:

Quote:
#!/usr/local/bin/perl
#
# Program to do the obvious
#

print "\n\n";
print 'Hello world.'; # Print a message
print "\n\n";

execute ("cd ..");
execute ("cd /etc");
What am I doing wrong?

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Doesn't recognize the mv command

I'm nearly finished my program i've got everything in place and than when i run it it comes back with the reply mv: command not found. This is the code that seems to be causing the problem. elif then echo "There are more than one '$1' files in the system." echo "Please... (2 Replies)
Discussion started by: zoolz
2 Replies

2. Shell Programming and Scripting

Command doesn't work under cron ?

I have defined in cron crontab -l >/FIXENGINE/data/crontab.$(whoami).$(date +%a) The resulting file is named crontab.fixadmin. When I run the above from a command line, the file is named: crontab.fixadmin.Tue (or whatever day I happen to be running) The question is - why do I get... (4 Replies)
Discussion started by: bigjohn-nj
4 Replies

3. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

4. Shell Programming and Scripting

How to build a command into a string rather than execute the command

I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example: mycmd='' if ...; then $mycmd='sudo ' fi $mycmd=$mycmd 'sed -i prev s/aaa/bbb/' $myfile res=`$mycmd` (I'm also not sure of the best way to execute the command from the... (1 Reply)
Discussion started by: littlejon
1 Replies

5. Shell Programming and Scripting

cd command doesn't work through variables

Hi.... cd command is not working when dual string drive/volume name is passed to cd through variables....... For Ex.... y=/Volumes/Backup\ vipin/ cd $y the above command gives error....... anyone with a genuine solution ? (16 Replies)
Discussion started by: vipinchauhan222
16 Replies

6. Shell Programming and Scripting

crontab doesn't allow `command` ??

Dear All, We wrote a script to clean email mailbox when they're nearly full and put it in cron : 0 0 * * * /root/quota/autoclean.sh > /root/quota/autoclean.`date '+%Y%m%d'` 2>&1 I've run this command from command prompt, it did work. However, if running from cron, it returned such error... (1 Reply)
Discussion started by: tiger2000
1 Replies

7. Homework & Coursework Questions

Command Doesn't Show Description

im making c code in linux and im having problems with one command, id should bring up a list but instead id doesnt do nothing, there are no error's, can anyone solve whats wrong ? void environ() { extern char **environ; int i=0; for (i = 0; environ !=NULL;i++) { ... (1 Reply)
Discussion started by: figureout
1 Replies

8. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

9. Shell Programming and Scripting

How to execute a command on each line of output from another command?

Hello :) new to bash not to programming. I have an on-going need to change the owning group on sets of files and directories from the one they were created with or changed to on update to the one they need to have going forward. find {target_root} -group wrong_group gets me a newline... (4 Replies)
Discussion started by: naftali
4 Replies

10. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
uuxqt(8)						      System Manager's Manual							  uuxqt(8)

NAME
uuxqt - UUCP execution daemon SYNOPSIS
uuxqt [ options ] DESCRIPTION
The uuxqt daemon executes commands requested by uux (1) from either the local system or from remote systems. It is started automatically by the uucico (8) daemon (unless uucico (8) is given the -q or --nouuxqt option). There is normally no need to run this command, since it will be invoked by uucico (8). However, it can be used to provide greater control over the processing of the work queue. Multiple invocations of uuxqt may be run at once, as controlled by the max-uuxqts configuration command. OPTIONS
The following options may be given to uuxqt. -c command, --command command Only execute requests for the specified command. For example: uuxqt --command rmail -s system, --system system Only execute requests originating from the specified system. -x type, --debug type Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. Only abnormal, config, spooldir and execute are meaningful for uuxqt. Multiple types may be given, separated by commas, and the --debug option may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example, --debug 2 is equivalent to --debug abnormal,chat. The debugging output is sent to the debugging file, which may be printed using uulog -D. -I file, --config Set configuration file to use. This option may not be available, depending upon how uuxqt was compiled. -v, --version Report version information and exit. --help Print a help message and exit. SEE ALSO
uucp(1), uux(1), uucico(8) AUTHOR
Ian Lance Taylor (ian@airs.com) Taylor UUCP 1.07 uuxqt(8)
All times are GMT -4. The time now is 05:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy