You seem to use two different shells, obviously, sh and csh, with (partly, admitted) incompatible syntax. So, what works error-free in one doesn't necessarily in the other. Is that intended?
I was not aware that I was using two different shells, although I will admit that I was in was in the wrong shell, which I did not realize until you mentioned this. My instructor told us to use tcsh which I switched to and I am still only able to get one program to execute, but I am getting slightly different errors now.
prog2 I attempted to pass with parameters
I know sed in an editing command and I assumed that $1,$2 were references to the lines to be edited, p is the command that will be editing those lines, and $3 is the name of the file being modified. I also attempted:
Because I know $ means variable substitution, but this just returns a new line.
prog3 now gives me
which I assume is due to a lack of parameters.
prog4 is giving the exact same output as before.
Quote:
Originally Posted by RudiC
So, with the error message please also post the shell emitting it.
And, please be meticulous when programming AND posting - one space too many may lead to synatx errors there and misinterpretations here. E.g. do you have if ( $#argv==0 ) then as in post#3, or if($#argv==0) then as in post#1?
My code is written exactly as it is in post #1, I even copied pasted it directly from the vi editor, so the spacing and new lines are all exactly the same from the post as in the actual code.
Quote:
Originally Posted by RudiC
You may want to set the --xtrace (-x) shell option when running your script; this might give you (and us) some more insight on what's going on and wrong.
Is --xtrace (-x) something that I input on the command line, and since it is an argument, what is the command that gets passed with it? Is this something that I can find using man, and if so, in what section?
I tried to be more specific this time and tried to include everything I thought would be necessary. If there is anything else, let me know, but I am completely stuck.
I notice that (Mandrake) Linux and Windows do not seem to operate alike in terms of installing third party software.
Windows, on one hand, creates icons and adds items to the Start Menu, with the help of the InstallShield--or equivalent, of course, but Linux, on the other hand, seems to care... (3 Replies)
I have installed Red Hat Linux 9.0 recently on my computer.
Im wondering if there are any good sites for downloading linux programs besides the site of Red Hat.
Thank you in advance!:D (4 Replies)
I need help to create batch file .
I want to run some programs in sequence in batch mode . I have one file which contains the name of program and command
The test.bat file contain this data
stsrun -v devel area1.exp
stsrun -v devel prime1.exp
stsrun -v devel treat.exp
Please help... (1 Reply)
:cool:
I need to execute a shell script to do the following:
cat a file
run two back ground processes using the first two values from the file
wait till those background processes finish
run two more background processes using the next two values from the file
wait till those background... (1 Reply)
Hi,
I want to make changes to inittab file and reread it using "telinit q" to make changes effective immediately. Is it safe to do that while important apps are running ?
thanks
Vilius (1 Reply)
Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Hello.
The last days I extended an open-source C++ library by some faster functions. This library provides a lot of short test programs which guarantee that the library works exactly.
The compilation of each test works in a Makefile automatically.
What I need is a shell script which... (5 Replies)
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)