home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / fut_1_00.zip / utils.inf (.txt) < prev   
OS/2 Help File  |  1996-12-30  |  13KB  |  385 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. This is a small set of utilities which were written to assist in my work on 
  5. both UNIX and OS/2 based machines. These types of routine may already have been 
  6. written many times, but in the absence of being able to find any easily 
  7. available I have produced my own. They have been made available as much for my 
  8. own satisfaction as for their potential usefulness. 
  9.  
  10. Currently there are four tools: 
  11.  
  12.      u2d :- UNIX to DOS file format convertor 
  13.  
  14.      d2u :- DOS to UNIX file format convertor 
  15.  
  16.      fsplit :- File splitting utility 
  17.  
  18.      hexdump :- Display the contents of a file in hexadecimal. 
  19.  
  20.  I am pleased to make them available for others to use. I would welcome 
  21.  feedback on them all, both in terms of problems which you have encountered or 
  22.  suggestions for improvements. 
  23.  
  24.  
  25. ΓòÉΓòÉΓòÉ 1.1. Build Information ΓòÉΓòÉΓòÉ
  26.  
  27. These utilities were written in 'C' and compiled using IBM's C Set++ compiler 
  28. on a Pentium based machine, but compiled without specific switches for a 
  29. Pentium. The version of OS/2 on the host machine was OS/2 WARP Version 4. 
  30.  
  31.  
  32. ΓòÉΓòÉΓòÉ 2. Utilities ΓòÉΓòÉΓòÉ
  33.  
  34. Following are the actual manual pages for the utilities. 
  35.  
  36.  
  37. ΓòÉΓòÉΓòÉ 2.1. u2d ΓòÉΓòÉΓòÉ
  38.  
  39. ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ d2u ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ source file ΓöÇΓöÇ
  40.    ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ       Γö£ /s Γöñ
  41.                                 Γö£ /h Γöñ
  42.                                 Γöö /v Γöÿ
  43. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ
  44.    ΓööΓöÇ destination file ΓöÇΓöÿ
  45.  
  46. This routine takes as input a UNIX format text file and provides as output a 
  47. DOS format text file. The contents of the original UNIX file are unaltered. 
  48.  
  49. It is possible to convert a UNIX format text file in-situ by use of the /s 
  50. switch if required. In this case the contents of the original UNIX file are 
  51. altered. 
  52.  
  53. Examples 
  54.  
  55. u2d a_UNIX_file a_DOS_file
  56.  
  57. The above example transforms the source file a_UNIX_file'  to the destination 
  58. file a_DOS_file. 
  59.  
  60. u2d /s a_text_file
  61.  
  62. The above example transforms the source file a_text_file from UNIX to DOS in 
  63. situ. 
  64.  
  65.  
  66. ΓòÉΓòÉΓòÉ 2.2. d2u ΓòÉΓòÉΓòÉ
  67.  
  68. ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ d2u ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ source file ΓöÇΓöÇ
  69.    ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ       Γö£ /s Γöñ
  70.                                 Γö£ /h Γöñ
  71.                                 Γöö /v Γöÿ
  72. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ
  73.    ΓööΓöÇ destination file ΓöÇΓöÿ
  74.  
  75. This routine takes as input a DOS format text file and provides as output a 
  76. UNIX format text file. The contents of the original DOS file are unaltered. 
  77.  
  78. It is possible to convert a DOS format text file in-situ by use of the /s 
  79. switch if required. In this case the contents of the original DOS file are 
  80. altered. 
  81.  
  82. Examples 
  83.  
  84. d2u a_DOS_file a_UNIX_file
  85.  
  86. The above example transforms the source file a_DOS_file'  to the destination 
  87. file a_UNIX_file. 
  88.  
  89. d2u /s a_text_file
  90.  
  91. The above example transforms the source file a_text_file from DOS to UNIX in 
  92. situ. 
  93.  
  94.  
  95. ΓòÉΓòÉΓòÉ 2.3. fsplit ΓòÉΓòÉΓòÉ
  96.  
  97. ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ fsplit ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ source file ΓöÇΓöÇ
  98.    ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ          Γö£ /b fileSize Γöñ
  99.                                    Γö£ΓöÇΓöÇΓöÇΓöÇ /h ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  100.                                    ΓööΓöÇΓöÇΓöÇΓöÇ /v ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  101. ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöñ
  102.    ΓööΓöÇ destination file root ΓöÇΓöÿ
  103.  
  104. This utility divides a source file up into a number of smaller files of 
  105. specified size. The last file may not be the exacy size as the source file may 
  106. not be exactly divisible. The resultan files have a root file as specified and 
  107. are qualified by an incremental count. 
  108.  
  109. The default file size is 1M Byte, but can be varied by use of the /b switch. 
  110. The /b switch specifies the resultant file size in bytes and can be qualified 
  111. by k or m. 
  112.  
  113. No reciprical utility exists for joining files together since this can be 
  114. achieved by using the OS/2 COPY command. 
  115.  
  116. Examples 
  117.  
  118. fsplit fromFile toFileRoot
  119.  
  120. The source file fromFile is divided into files of the default size 1M with the 
  121. root of their name being toFileRoot. Thus, the output files will be 
  122. toFileRoot.001, toFileRoot.002 etc. 
  123.  
  124. fsplit /b 1k fromFile toFileRoot
  125.  
  126. This example operates as per the above example, except that this version 
  127. explicitly sets the resultant file size to 1k. 
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 2.4. hexdump ΓòÉΓòÉΓòÉ
  131.  
  132. ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ hexdump ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ source file ΓöÇΓöÇΓöñ
  133.    ΓööΓöÇ drive ΓöÇΓöÿ ΓööΓöÇ path ΓöÇΓöÿ           Γö£ /h Γöñ
  134.                                     Γöö /v Γöÿ
  135.  
  136. This utility produces a hexadecimal listing of a file. The byte count, 
  137. hexadecimal codes and actual file contents are displayed. As no paging is 
  138. included the result for large files is best redirected into another file for 
  139. viewing with an editor. 
  140.  
  141. The row format of the hexadecimal listing is the byte count in hex, followed by 
  142. eight pairs of hexadeciml values for the file contents and finally the 
  143. corresponding contents of the file itself. Non-ascii characters are shown be a 
  144. period. 
  145.  
  146. Examples 
  147.  
  148. hexdump fileToDump > HEXDUMP_file
  149.  
  150. This example produces a hexadecimal listing of the file fileToDump and 
  151. redirects the output to the file HEXDUMP_file. 
  152.  
  153.  
  154. ΓòÉΓòÉΓòÉ 3. Legal Issues ΓòÉΓòÉΓòÉ
  155.  
  156.  For completeness here are the usual set of license details, acknowledgments, 
  157. copyright and disclaimers. 
  158.  
  159.  
  160. ΓòÉΓòÉΓòÉ 3.1. License ΓòÉΓòÉΓòÉ
  161.  
  162. This software is protected by copyright and all rights are reserved by the 
  163. author. 
  164.  
  165. These utility versions are currently available for you to freely use and 
  166. distribute, but their status may change with future upgrades and releases. You 
  167. may not charge anyone for this software other than those charges incurred in 
  168. effecting the transfer. 
  169.  
  170.  
  171. ΓòÉΓòÉΓòÉ 3.2. Acknowledgments ΓòÉΓòÉΓòÉ
  172.  
  173. I wish to acknowledge all trademarks which appear in this documentaion and are 
  174. used by the software, they belong to their respective owners. 
  175.  
  176. In particular 
  177.  
  178.   OS/2, IBM and Presentation Manager are registered trademarks of IBM 
  179.  Corporation. 
  180.  
  181.   Pentium is a registered trademark of Intel Corporation. 
  182.  
  183.  
  184. ΓòÉΓòÉΓòÉ 3.3. Copyright ΓòÉΓòÉΓòÉ
  185.  
  186. (C) Copyright John S Glover 1996. All rights reserved 
  187.  
  188.  
  189. ΓòÉΓòÉΓòÉ 3.4. Disclaimer ΓòÉΓòÉΓòÉ
  190.  
  191. This software is provided as is without warranty of any kind, either expressed 
  192. or implied, including but not limited to the implied warranty of 
  193. merchantability and fitness for a particular purpose. 
  194.  
  195. I take no responsibility for any damage these utilities do to your data, files 
  196. or computer, or any other damage. You use these utilities at your own risk. 
  197.  
  198.  
  199. ΓòÉΓòÉΓòÉ 4. Problem Reports and Future Ideas ΓòÉΓòÉΓòÉ
  200.  
  201.  I am keen to know of any incorrect operation, anomalies in documentation, or 
  202. suggestions for enhancements and additions. Therefore, all brickbats and 
  203. bouquets to 
  204.  
  205. John S Glover 
  206. 1 Glebelands Meadow 
  207. Alfold 
  208. Surrey 
  209. GU6 8EA 
  210. United Kingdom 
  211.  
  212. jsglover@iee.org 
  213.  
  214. If you do have any problems please provide as complete a description as 
  215. possible in terms of input, output and options selected for the utilities or 
  216. where you disagree with the description in the manual and the actually 
  217. operation. I make no promise to fix the problem since it all depends on the 
  218. time available to me, but I will do my best. I regret that a written postal 
  219. response can not be made unless a stamped addressed envelope is sent. 
  220.  
  221. If anyone who uses these utilities and wishes to make a donation towards my 
  222. time and expense then all contributions would be gratefully received, pounds 
  223. sterling. A picture postcard of your home town would be a cheaper and more 
  224. interesting method of expressing your views on this software and informing me 
  225. on who has used this software. 
  226.  
  227. For the future I have a number of intentions to improve the utilities 
  228. including: 
  229.  
  230.   Γûá generate Presentation Manager variants. IBM with OS/2 have generated a 
  231.  powerful and flexible working environment and it would be appropriate to 
  232.  derive the maximum benefit and productivity. 
  233.  
  234.   Γûá account for the extended attributes when spliting files with fsplit. The 
  235.  extended attributes of a file are currently lost when the file is split which 
  236.  is rather careless. Where though should the extended attributes be stored? 
  237.  
  238.   Γûá improve the command line parsing. The robustness of command line parsing 
  239.  could be made stronger and more forgiving. 
  240.  
  241.   Γûá improve file size specification for fsplit. As you may notice only integer 
  242.  values can be used with the k, m qualifiers, so for example, 1.4m causes an 
  243.  error. 
  244.  
  245.   Γûá paging within hexdump. All the file is listed in hexadecimal format, so 
  246.  either the scrolling must be interrupted in the OS/2 window using ^S or the 
  247.  output directed to a file. 
  248.  
  249.  
  250. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  251.  
  252.    External Command: Drive and Path Parameters 
  253.  
  254.  Specifies the drive and location for the command you want to process. External 
  255.  commands are stored on the disk as program files. When an external command is 
  256.  entered, the system searches for it in the current directory of the default or 
  257.  specified drive. If the command is not found, the system continues searching 
  258.  for it in the directories listed in the PATH statement. 
  259.  
  260.  
  261. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  262.  
  263.  A UNIX format text file which is to be converted to a DOS format text file. 
  264.  
  265.  
  266. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  267.  
  268.  A DOS format text file which is the resultant of converting the UNIX source 
  269.  file. 
  270.  
  271.  
  272. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  273.  
  274.  A DOS format text file which is to be converted to a UNIX format text file. 
  275.  
  276.  
  277. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  278.  
  279.  A UNIX format text file which is the resultant of converting the DOS source 
  280.  file. 
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  284.  
  285.         d2u Command: /S Parameter. 
  286.  
  287.  Specify the /S parameter to process the source file in-situ, i.e. the 
  288.  resultant file name is the source file name. A destination file should NOT be 
  289.  specified. 
  290.  
  291.  
  292. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  293.  
  294.  A file which is to be divided into smaller separate files. 
  295.  
  296.  
  297. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  298.  
  299.  The root from which the output file names are to be derived. 
  300.  
  301.  
  302. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  303.  
  304.  A file for which a hexadeximal listing is required. 
  305.  
  306.  
  307. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  308.  
  309.         u2d Command: /S Parameter. 
  310.  
  311.  Specify the /S parameter to process the source file in-situ, i.e. the 
  312.  resultant file name is the source file name. A destination file should NOT be 
  313.  specified. 
  314.  
  315.  
  316. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  317.  
  318.         u2d Command: /H Parameter. 
  319.  
  320.  Display a simple usage summary. 
  321.  
  322.  This is synonomous with /?. 
  323.  
  324.  
  325. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  326.  
  327.         u2d Command: /V Parameter. 
  328.  
  329.  Display the current version information. 
  330.  
  331.  
  332. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  333.  
  334.         d2u Command: /H Parameter. 
  335.  
  336.  Display a simple usage summary. 
  337.  
  338.  This is synonomous with /?. 
  339.  
  340.  
  341. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  342.  
  343.         d2u Command: /V Parameter. 
  344.  
  345.  Display the current version information. 
  346.  
  347.  
  348. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  349.  
  350.         fsplit Command: /H Parameter. 
  351.  
  352.  Display a simple usage summary. 
  353.  
  354.  This is synonomous with /?. 
  355.  
  356.  
  357. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  358.  
  359.         fsplit Command: /V Parameter. 
  360.  
  361.  Display the current version information. 
  362.  
  363.  
  364. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  365.  
  366.         fsplit Command: /B fileSize. 
  367.  
  368.  Set the output file size to  fileSize.  The file size can be qualified by use 
  369.  of k or m for kilobytes or megabytes. 
  370.  
  371.  
  372. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  373.  
  374.         hexdump Command: /H Parameter. 
  375.  
  376.  Display a simple usage summary. 
  377.  
  378.  This is synonomous with /?. 
  379.  
  380.  
  381. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  382.  
  383.         hexdump Command: /V Parameter. 
  384.  
  385.  Display the current version information.