Sponsored Content
Full Discussion: Unix Path Options
Top Forums UNIX for Dummies Questions & Answers Unix Path Options Post 10621 by Shakey21 on Sunday 18th of November 2001 08:01:18 PM
Old 11-18-2001
Unix Path Options

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.

Thanks
Shakey21
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

missing Path(in UNIX) when i launch a job on to unix machine using windows SSh

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)
Discussion started by: megastar
1 Replies

2. Shell Programming and Scripting

path options clarification

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)
Discussion started by: pravfraz
2 Replies

3. UNIX for Dummies Questions & Answers

Unix : About options of clear command ?

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)
Discussion started by: Ben31400
5 Replies

4. UNIX for Dummies Questions & Answers

What are the career options in unix apart from unix system administration?

What are the career options in unix apart from unix system administration? (2 Replies)
Discussion started by: thulasidharan2k
2 Replies

5. UNIX for Dummies Questions & Answers

UNIX find command - using multiple -name options

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)
Discussion started by: jtmed
2 Replies

6. UNIX for Dummies Questions & Answers

UNIX sql options

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)
Discussion started by: sas
2 Replies

7. UNIX for Dummies Questions & Answers

UNIX ls options

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)
Discussion started by: Stephvai
1 Replies

8. Shell Programming and Scripting

UNIX Date function with -d options

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)
Discussion started by: LoneRanger
2 Replies

9. 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
MGP2PS(1)						    BSD General Commands Manual 						 MGP2PS(1)

NAME
mgp2ps -- generate PostScript file from MagicPoint file SYNOPSIS
mgp2ps [-cirtV] [-f psfile] [-p papersize] [-x xmargin] [-y ymargin] mgpfile DESCRIPTION
mgp2ps is a converter from MagicPoint file mgpfile to PostScript file. If -f option is specified, PostScript will be generated to psfile. Otherwise, printed to the standard output. If there exists foo.eps corresponding to foo.gif (or whatever), the encapsulated PostScript file will be included to the PostScript file instead. The following options are available: -c Generate color PostScript file (experimental). By default mgp2ps will generate monochrome postscript file. -i Paint inside icon symbols. -r Stack the paper in reverse order. -V Be verbose. -f psfile Pathname to put the PostScript output. -p papersize papersize specifies the size of the paper to be used. a3, a4, a5, b5, A3, A4, A5, B5, letter, legal, ledger, tabloid, statement, executive, folio, quarto and 10x14 are available. Default size is a4. -x xmargin -y ymargin xmargin and ymargin specifies length of the margin area around the edge of the paper. -t Use truetypefont instead of psfont (ASCII font only). -e Specify encodings. At this moment, "iso-8859-1", "latin1", "iso-8859-2" "and latin-2" are supported as encodings. -m emulate "%pause" directive. -X engine Do not use rendering engine, specified by engine. engine can be only FreeType so far. -g level specify the distance level between lines. If level is 0, the result will be close to the result of xft2 rendering. If others, it will be close to the result of other rendering engines. SEE ALSO
mgp(1) HISTORY
mgp2ps was created so that Kazu Yamamoto could submit his tutorial document to the committee of Internet Week '97. BSD
June 1, 2019 BSD
All times are GMT -4. The time now is 11:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy