Link to home
Start Free TrialLog in
Avatar of doron123
doron123

asked on

Multiple argument scripts .....

hi there guys:
---------------
i want to know how to write a script where i have to give multple arguments that are not at start up :
for example if i want to write a script for c-shell to operate emacs its simple i write : (c-shell "emacs") /or creates a file opening emacs and just calling the prog.
but i f i want to use the "wall" option or the "write" option ... how do i do it?
to operate the wall i write : (c-shell "wall")
and than i must press enter and than to write the data and at the end ^d (ctrl+d) .
here i'm stuck ,please help me how do i do it.
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of doron123
doron123

ASKER

Thanks it works!!!! .
one thing more on this issue ..
when i write ^d or EndOfFile ,its shown on the screen and then! it terminates .. is there any option to not show it ..
like in dos @<argument> ,and then your command is not written?

is there any tool that can compile a script to run (like exe or com file so that not anyone can see its contant?

If you use my 1'st solution (script <data_file), the data_file does not contain  EndOfText  nor  ^d.
((-: UNIX knows where a file ends: when there are no more chars :-))
So these should not be seen on the screen.

If you use my 2'nd solution, you must redirect stdout and/or stderr, this gets tricky for this example.

compile? Of cource: write it in any language of your desire (ada, C, C++, COBOL, FORTRAN, PASCAL, ...) and compile it.
There's no way to compile a script. The only solution I know is to crypt the script anyhow and use a wrapper which decrypt's it and then executes; any language solution would be more efficient.
last thing .. i run a program of "Ami" ,which is long and does a lot of things that takes time ,i want to write each proccess that ends sends a remark (for it endividualy).... so the file solution is complicated .. isn't there any other solution to write the "Wall" and "write" without the file but to enter them with the same line ... like "write doron-a <text> "???

"Ami"? I don't know that.

I've not understood what you want to do exactly, need to know the context.
Give me some more info (may be your current script).
I'm shure that I find  a solution and then charge you for the points :-)
ok ...
it goes :
(in-pack "access")
(map "netlist name")
<here i want at the end of this proccess to write")
(c-shell "write <username> <text>")
i.e
(c-shell "write doron-a mapping stage finished")

there are alot of proccessed like here ,and i can't write a global scritp for this cause ,since each project is in an other directories ,and if i want to send it to the company than i don't want them to have too many files (it won't work) ,i want to write as in the example here in one line the content ,or if no other choise ,is there an option of having one file and telling in the script to write each time only some line that i will choose (i.e (c-shell "write doron-a line2>file_name")
meaning having one file with all the lines i want and telling in the script each time what line to write .

p.s.
-----
the script i sent you two lines from the first one is meaningless to you the secong is the begining of a stage in the entire process .. (meaningless here as well) .
the third line is what i want to add to the script (c-shell of course means use the c-shell commands).