I am looking for the best way to move files into a directory (ie PDF_files), if the directory doesn't exist to create it.
However I am passing the full filename (psfile) of the file so I will have to remove the filename from the end, which can be at different field end lengths.
This is a piece of the code:
Code:
ENVIRON=`pwd`
find ${ENVIRON} -name "*.ps" -user $user | while read psfile
do
pdffile=`echo $psfile | sed s/.ps$//g`
if [ -f ${pdffile}*.pdf ] ; then
gzip -f ${pdffile}*.pdf
fi
I have a few ideas, however I would like to have some guidance. Any suggestions would be much appreciated.
hi
i want run an unix application from a windows program/application.i am using SSH(command line version)to log on to a unix machine from windows. the application has to read a configuration file inorder to run. the configuration file .CFG is in bin in my home directory. but the application... (1 Reply)
hi guys..
i want to know as what these options -O and -n stand for, in the following:
HOSTNM=$(/u/bin/wmuname -O)
HOSTNM=$(/usr/bin/uname -n)
can u please help me! awaiting your reply... (2 Replies)
Hello everyone,
My question is quite simple, even if I didn't find an answer. I would want a command (maybe clear with some options ?) that can do the following : clear completely the console, as it is when we start a console for the first time.
My problem is that I sometimes display a lot... (5 Replies)
Hi all,
What am trying do is search for a directory that is owned by cm that only exists in a path that has a particular directory
ex: what I'm using now is
find . -user cm -name '*.rel' -type d -exec ls -dl {} \;
This is giving me stuff like this
./../../foo1/../../*.rel... (2 Replies)
New to the unix experience and sure love it.
I do all my big sql queries using unix sas, it's great, can't complain. Also have isql on the box to work with Sybase db's if need be.
Just wondering if there's any large-amt-of-data-folks round here that might suggest some other sql/data tools... (2 Replies)
Hi Guys I'm new to the forums and Unix. I have my first assignment for school and i'm stuck on question 1 spent close to 4 hours on it :(. (doesn't look good). I looked the the online documentation of ls but don't really understand it yet.
I need to find files whose names that are of length... (1 Reply)
Hi ,
I couldn't understand how this program works. Can somebody please explain it to me.
DT=`date -d "1 day"` # This part I understand
echo ${DT/ */} # How this works
echo ${DT/* /} (2 Replies)
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
LEARN ABOUT MINIX
environ
ENVIRON(7) Miscellaneous Information Manual ENVIRON(7)NAME
environ - user environment
SYNOPSIS
extern char *const *environ;
DESCRIPTION
An array of strings called the `environment' is made available by execve(2) when a process begins. By convention these strings have the
form `name=value'. The following names are used by various commands:
PATH The sequence of directory prefixes that sh, time, nice(1), etc., apply in searching for a file known by an incomplete path name.
The prefixes are separated by `:'. Login shells set PATH=:/bin:/usr/bin. Note that the empty space between the `=' and the `:'
indicates the current directory. Security aware people move the extra `:' to the end of their path or omit it.
HOME A user's login directory, set by login(1) from the password file passwd(5).
TERM The kind of terminal for which output is to be prepared. This information is used by programs that wish to exploit special termi-
nal capabilities, a screen oriented text editor for instance. The terminal type is set by login(1) from the tty database
ttytab(5).
SHELL The file name of the users login shell, set by login(1) from the password file passwd(5).
TERMCAP The string describing the terminal in TERM, or the name of the termcap file, see termcap(5), termcap(3).
EXINIT A startup list of commands read by elvis(1).
USER The login name of the user, set by login(1) from the password file passwd(5).
LOGNAME Set to the same value as USER. BSD derived systems have USER, System V has LOGNAME, so modern systems have both to avoid problems.
Further names may be placed in the environment by the
export command and `name=value' arguments in sh(1). Arguments may also be placed in their environment by programs if they use
putenv(3). Or in the environment of another program by building a new environment for one of the exec functions that accepts an
environment list, like execle(2) or execve(2). It is unwise to conflict with certain sh(1) variables that are frequently set and/or
exported by `.profile' files: MAIL, PS1, PS2, IFS.
SEE ALSO elvis(1), login(1), sh(1), execl(2), execve(2), system(3), termcap(3), termcap(5), ttytab(5).
4.2 Berkeley Distribution May 20, 1985 ENVIRON(7)