Simple UNIX Shell Script help, PLEASE


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Simple UNIX Shell Script help, PLEASE
# 1  
Old 08-02-2001
Computer Simple UNIX Shell Script help, PLEASE

I don't know anything about UNIX. I have been developing on NT platform and now a batch file I was running in my java code must work on UNIX instead. How do I change the below .bat file into a shell script that can be run on UNIX? Thanks in advance for your help.


@ECHO OFF
D:
CD\ARIBA\BUYER7\CORESERVER\FAXORDERS
LPR -S 10.10.10.35 -P TCPFAXGATE DO270.TXT


What extension do I save it as if it's a shell script? Sorry, I'm clueless. Thanks.
# 2  
Old 08-02-2001
You might change the script to be something like:

cd /ARIBA/BUYER7/CORESERVER/FAXORDERS
lpr -S 10.10.10.35 -P TCPFAXGATE DO270.TXT



Just change the path to whatever is appropriate. Remember that Unix is case sensitive. You do not have to give the script any particular extension, just make it executable by typing:

chmod +x <I>filename</I>
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help on simple shell script

Hello, I need to create one very simple shell script that checks if the first character of the file ./pump.txt is 0 and in that case gives a message. If the first character is instead 1, it does give a different message. I have written: irr= head -c 1 ./pump.txt if ]; then echo... (4 Replies)
Discussion started by: dcaccount
4 Replies

2. Shell Programming and Scripting

Simple Shell Script! Almost Done!

Hello, I am creating a shell script and I am almost done. I have certain things I want done in the shell but don't know how to finish it properly. Here is what I am aiming to do. I am aiming to have a shell that takes at least 3 parameters. The first two are the two words to replace (the... (3 Replies)
Discussion started by: ShellsNewb
3 Replies

3. Shell Programming and Scripting

Help with simple Shell Script

Hi , I am in need of simple shell script that has one input file containing some words Input file 1 : ****ALEX***JOHN*******VIRGIL***** CHRITINE*****FAISAL*****DON***** ****ALEX***JOHN*******VIRGIL***** CHRITINE*****FAISAL*****DON***** ****ALEX***JOHN*******VIRGIL*****... (6 Replies)
Discussion started by: kmanjuna
6 Replies

4. Shell Programming and Scripting

Help me with simple shell script.

Hello forum members, I have to redirect a output of command into a text file inside a script file but iam getting an errors.so please see below script and suggest me for corrections. #!/bin/ksh read IP_ADD echo nslookup $IP_ADD 2>&1| tee log1.txt cat /amex/gcst/siva/Testr/log1.txt... (6 Replies)
Discussion started by: rajkumar_g
6 Replies

5. Shell Programming and Scripting

simple shell - how to get a parameter typed in a shell script

Hi, I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Discussion started by: cmitulescu
4 Replies

6. Shell Programming and Scripting

Simple Shell Script Need Help

I M TRYING TO DO SUM THING I M A NEW LEARNER TO SHELL SCRIPT PLZZZ HELP ME FRIENDS I M TRY TO DO SUM THING C IT AND HELP ME First open a .ctl file Copy the file into temp file Add A EXTRA FIELD “ext_date” with keeping value “##**&&” EG- EXT_DATE CONSTANT"******" Each time... (2 Replies)
Discussion started by: kulbir
2 Replies

7. Shell Programming and Scripting

A simple query on unix shell script

I want to write a script to go to particular path in file and run shell script from there. what will be shell script for the same. (2 Replies)
Discussion started by: shekhar_ssm
2 Replies

8. Shell Programming and Scripting

Creating a command history feature in a simple UNIX shell using C

I'm trying to write a history feature to a very simple UNIX shell that will list the last 10 commands used when control-c is pressed. A user can then run a previous command by typing r x, where x is the first letter of the command. I'm having quite a bit of trouble figuring out what I need to do, I... (2 Replies)
Discussion started by: -=Cn=-
2 Replies

9. UNIX for Advanced & Expert Users

How to design a simple multi tasking shell in unix using C language

can any one help me in designing a shell in unix like bash shell using c language plzzzzzzzzzzzzzzzzzzzz help (1 Reply)
Discussion started by: mobile01
1 Replies

10. Shell Programming and Scripting

A Simple shell Script

Hi there. im creating a shell script which helps me perform simple functions when i use it, but there are still two functions which i cannot figure out yet. 1) how can I count the number of occurences of a certain file within the whole file system? (filename supplied as an argument.) 2) How... (2 Replies)
Discussion started by: provo
2 Replies
Login or Register to Ask a Question