29.06.2013 Views

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Exit Status<br />

Examples<br />

Notes<br />

80 <strong>Qshell</strong> <strong>Interpreter</strong> (<strong>qsh</strong>)<br />

v 0 when all files were processed successfully<br />

v >0 when an error occurred<br />

1. To list all files in a jar file named myjar which is located in the current directory:<br />

ajar -l myjar<br />

2. To list all .java files in myjar: ajar -l myjar \*.java<br />

3. To extract all files from myjar into the current directory: ajar -x myjar<br />

4. To create a jar named myjar containing all directories and files in the file<br />

system hierarchy rooted in the current directory (Note in this example <strong>Qshell</strong><br />

interprets the ’*’ and expands it so that the list of candidate files contains all<br />

files and directories in the current directory.): ajar -c -r myjar *<br />

5. To create a jar named myjar containing entries for only the files in the current<br />

directory: ajar -c -D myjar *<br />

6. To create the same jar file without a manifest (which is simply a zip file for all<br />

practical purposes): ajar -c -D -M myjar *<br />

7. To create a jar named myjar containing all files except .java files in the file<br />

system hierarchy rooted in the current directory: ajar -c -r myjar * -x \*.java<br />

8. To create a jar named myjar containing only the .class files in a file system<br />

hierarchy rooted in the current directory: ajar -c -r myjar * -i \*.class<br />

9. To create a jar named myjar without deflating the .java files: ajar -c -r -n java<br />

— myjar *<br />

10. To create a jar named myjar while reading the file list from stdin: ajar -@ -c -r<br />

myjar<br />

Sample stdin data:<br />

docs<br />

source<br />

classes<br />

-x<br />

docs/foo/*<br />

11. To add a file named bar to a jar named myjar: ajar -a myjar bar<br />

12. To delete a file named foo/bar from a jar named myjar: ajar -d myjar foo/bar<br />

1. Short options can be clustered (e.g. -c -v -D is the same as -cvD). Long options<br />

(—create, —verbose, —nodirs, ..., etc.) can be abbreviated as long as the<br />

abbreviations are unique.<br />

2. File names can be changed when creating a jar or adding a file to a jar. For<br />

example, “ajar -c x.jar bin/foo : bin/bar” creates the jar file x.jar from the file<br />

bin/foo with a single entry, bin/bar. This can also be done using stdin, “ajar -c@<br />

x.jar”, where stdin contains:<br />

bin/foo : bin/bar<br />

3. Use of ajar requires the Q<strong>IBM</strong>_MULTI_THREADED environment variable must<br />

be set to ’Y’.<br />

[ Legal | AS/400 Glossary ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!