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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. Programming
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
3. UNIX for Advanced & Expert Users
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
4. Windows & DOS: Issues & Discussions
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
5. Linux
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Windows & DOS: Issues & Discussions
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
9. UNIX and Linux Applications
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
10. Shell Programming and Scripting
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
LEARN ABOUT NETBSD
getopt
GETOPT(1) BSD General Commands Manual GETOPT(1)
NAME
getopt -- parse command options
SYNOPSIS
args=`getopt optstring $*`
set -- `getopt optstring $*`
DESCRIPTION
getopt is used to break up options in command lines for easy parsing by shell procedures, and to check for legal options. [Optstring] is a
string of recognized option letters (see getopt(3)); if a letter is followed by a colon, the option is expected to have an argument which may
or may not be separated from it by white space. The special option ``--'' is used to delimit the end of the options. getopt will place
``--'' in the arguments at the end of the options, or recognize it if used explicitly. The shell arguments ($1, $2, ...) are reset so that
each option is preceded by a ``-'' and in its own shell argument; each option argument is also in its own shell argument.
getopt should not be used in new scripts; use the shell builtin getopts instead.
EXAMPLES
The following code fragment shows how one might process the arguments for a command that can take the options [a] and [b], and the option
[c], which requires an argument.
args=`getopt abc: $*`
if [ $? -ne 0 ]; then
echo 'Usage: ...'
exit 2
fi
set -- $args
while [ $# -gt 0 ]; do
case "$1" in
-a|-b)
flag=$1
;;
-c)
carg=$2; shift
;;
--)
shift; break
;;
esac
shift
done
This code will accept any of the following as equivalent:
cmd -acarg file file
cmd -a -c arg file file
cmd -carg -a file file
cmd -a -carg -- file file
IEEE Std 1003.2 (``POSIX.2'') mandates that the sh(1) set command return the value of 0 for the exit status. Therefore, the exit status of
the getopt command is lost when getopt and the sh(1) set command are used on the same line. The example given is one way to detect errors
found by getopt.
DIAGNOSTICS
getopt prints an error message on the standard error output when it encounters an option letter not included in [optstring].
SEE ALSO
sh(1), getopt(3)
HISTORY
Written by Henry Spencer, working from a Bell Labs manual page. Behavior believed identical to the Bell version.
BUGS
Whatever getopt(3) has.
Arguments containing white space or embedded shell metacharacters generally will not survive intact; this looks easy to fix but isn't.
The error message for an invalid option is identified as coming from getopt rather than from the shell procedure containing the invocation of
getopt; this again is hard to fix.
The precise best way to use the set command to set the arguments without disrupting the value(s) of shell options varies from one shell ver-
sion to another.
BSD
November 28, 2009 BSD