Sponsored Content
Full Discussion: A little help please
Top Forums Shell Programming and Scripting A little help please Post 302145589 by immyakram on Wednesday 14th of November 2007 05:21:14 PM
Old 11-14-2007
Iv created a file called filex and i have inserted the env details to it.

Did this by touch filex
then env > filex
checked to see if file has got the correct content in by cat filex.

Then iv created a script by creating a file - touch firstline
and the opening it in vi editor.

Does my first line not have to #!/bin/bash or what u have stated.

get stuck here...
This User Gave Thanks to immyakram For This Post:
 
ENV(1)							    BSD General Commands Manual 						    ENV(1)

NAME
env -- set and print environment SYNOPSIS
env [-i] [name=value ...] [utility [argument ...]] DESCRIPTION
env executes utility after modifying the environment as specified on the command line. The option name=value specifies an environmental variable, name, with a value of value. The option '-i' causes env to completely ignore the environment it inherits. If no utility is specified, env prints out the names and values of the variables in the environment, with one name=value pair per line. EXIT STATUS
env exits with one of the following values: 0 utility was invoked and completed successfully. In this case the exit code is returned by the utility itself, not env. If no util- ity was specified, then env completed successfully and returned the exit code itself. 1 An invalid command line option was passed to env. 1-125 utility was invoked, but failed in some way; see its manual page for more information. In this case the exit code is returned by the utility itself, not env. 126 utility was found, but could not be invoked. 127 utility could not be found. COMPATIBILITY
The historic - option has been deprecated but is still supported in this implementation. SEE ALSO
execvp(3), environ(7) STANDARDS
The env utility conforms to IEEE Std 1003.2-1992 (``POSIX.2''). BUGS
env doesn't handle commands with equal (``='') signs in their names, for obvious reasons. BSD
June 8, 2007 BSD
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy