Windows command shell equivalent in Unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Windows command shell equivalent in Unix
# 1  
Old 04-29-2009
Question Windows command shell equivalent in Unix

In Windows we use cmd.exe \c as the command SHell

What is its equivalent in UNIX ?


Thanx for all your help.
# 2  
Old 04-29-2009
/bin/sh

anthing you pass to //bin/sh will get run as shell script.
# 3  
Old 04-29-2009
That was a quick response. Thanx.

Just curious why would

/bin/sh ls command fail with Execute permission denied

but $ls works
# 4  
Old 04-29-2009
all unix shell scripts start with #!/bin/sh
the #! is a statment to the kernal to run the following stuff with /bin/sh
if you where doing perl script the your first line would be #!/usr/bin/perl

what are you trying to get done?

if you are trying to do someting like a .BAT file then you will make a file starting with #!/bin/sh
# 5  
Old 04-29-2009
I have a Java application which goes to the OS and runs unix utlities.
So its not running any shell scripts.
I needs to know the shell command line which I give it as /bin/sh as you mentioned

It will then go to the shell and run say commands like ls

/bin/sh ls which it fails with execute permission denied
# 6  
Old 04-29-2009
now I understqand what your doing....
you should just be able to use "ls" or what ever directly.

you should not need /bin/sh for this kind of thing....

what command do you want to run??
# 7  
Old 04-30-2009
The problem is the Java application runs the shell and then the ls command

So in the application it ask for the shell interpretor which I give /bin/sh

then it uses this to run the ls command or basic utilities.

Q:- why would $/bin/sh ls not work when
$ls works ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Equivalent to let command in POSIX shell

Hi all, I am learning POSIX shell programming, and the book I read, uses the let command for integer arithmetic. I have downloaded and use the shellcheck program on Linux. This programs says: In POSIX sh, 'let' is undefined. See the screenshot attached. What is the POSIX... (1 Reply)
Discussion started by: johnprogrammer
1 Replies

2. UNIX and Linux Applications

UNIX equivalent of windows terminal server options?

I want to replace Windows terminal server mostly due to cost reasons license cost for 2100 users goes out of roof. The end-user is all windows but I want a jump server that is UNIX based , I have some experience with VNC but I don't want options exists in UNIX to run a terminal services for 2100... (10 Replies)
Discussion started by: lazerz
10 Replies

3. Windows & DOS: Issues & Discussions

DOS Equivalent of UNIX Command

Hi, The title of this post is a little vague but I couldn't think of what to call it. In Unix you can perform the following command ftp -v IPADDRESS <<END put FILE END In a DOS command prompt, is it possible to do the same kind of thing that the "<<END" does? So for example, ... (4 Replies)
Discussion started by: Ste_Moore01
4 Replies

4. Shell Programming and Scripting

Use Unix shell script to open Windows command prompt (cmd)

Hello, I work on Windows and I use Putty to access a remote UNIX server. I am trying to build a shell script that will have as main task to open the Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies

5. Shell Programming and Scripting

PHP Equivalent of the unix command

Hi Can any one please let me know which will be the PHP equivalent of the below Unix statement, curl -H "Content-type: application/json" -H "Accept: application/json" --data-binary '{"text" : "how to check the temperature?"}' -H "X-JaskUid:111" -X POST "www.google.com/res"'Thanks in advance!! ... (0 Replies)
Discussion started by: vidhyaS
0 Replies

6. Linux

Unix Equivalent Windows Variable

Hi, I've set my Unix User Profile Variables as follows.. export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 I want to set the same codepages in my Windows Vista Environment.. How can i do that..? Whether the variable names remain same ..? Please help Regards, Vikram... (1 Reply)
Discussion started by: vickramshetty
1 Replies

7. Windows & DOS: Issues & Discussions

dos/intel unix command equivalent

In Unix I can use command line to do a find for files older than so many days and remove them. I can also capture the date to see if its a saturday and do something different. Are there any dos/intel command line equivalent commands to do this on a windows 2003 server? This is from an... (6 Replies)
Discussion started by: MizzGail
6 Replies

8. UNIX for Advanced & Expert Users

Equivalent command for setlocal in Unix

Hi all, Is there any command in unix equivalent to setlocal in windows. setlocal command is really useful in restoring local environment variables in windows. Thanks, Sonal. (7 Replies)
Discussion started by: sonaluphale
7 Replies

9. Programming

unix equivalent for windows APIs..........................

Hi, Is there any unix equivalents available for the folllowing windows function ? FindFirstFile FindNextFile etc..... Or do i have to write an equivalent api?? Can anybody help me to do the same?? thanks in advance Ani (2 Replies)
Discussion started by: ani
2 Replies

10. UNIX for Dummies Questions & Answers

Unix Equivalent of Windows NT Diagnostic (Winmsd) report

Hi Guys, Is there a way I can generate a Diagnostic Report for Unix app server/database server (for sun solaris and aix) similar to the system diagnostic report in Windows NT(winmsd). Basically I am looking for the following details below in a single comprehensive report. If there is no... (2 Replies)
Discussion started by: neer
2 Replies
Login or Register to Ask a Question