Solved

Need a quick script

Posted on 1999-01-20
4
192 Views
Last Modified: 2010-04-20
Hi. Ineed a quick BASH script which I can use to chop up a large binary file for later reasebmly on a DOS system using something like copy /b . I used to have one, but it seemed to have got lost.

Thanks in advance for your time.

Nicholas Waltham
0
Comment
Question by:nwaltham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1639187
split -b1m file
0
 

Author Comment

by:nwaltham
ID: 1639188
:-) Well thats a nice script. Now why doesn't that command have a manual entry! Can you answer the question, and I will give you the points
0
 
LVL 84

Accepted Solution

by:
ozo earned 30 total points
ID: 1639189
split(1)                                                           split(1)

 NAME
      split - split a file into pieces

 SYNOPSIS
      split [-l line_count] [-a suffix_length] [file [name]]

      split [-b n[k|m]] [-a suffix_length] [file [name]]

      Obsolescent:
      split [-n] [file [name]]

 DESCRIPTION
      split reads file and writes it in pieces (default 1000 lines) onto a
      set of output files.  The name of the first output file is name with
      aa appended, and so on lexicographically, up to zz (only ASCII letters
      are used, a maximum of 676 files).  If no output name is given, x is
      the default.

      If no input file is given, or if - is given instead, the standard
      input file is used.

 OPTIONS
      split recognizes the following command-line options and arguments:

           -l line_count  The input file is split into pieces line_count
                          lines in size.

           -a suffix_length
                          suffix_length letters are used to form the suffix
                          of the output filenames.  This option allows
                          creation of more than 676 output files.  The
                          output file names created cannot exceed the
                          maximum file name length allowed in the directory
                          containing the files.

           -b n           The input file is split into pieces n bytes in
                          size.

           -b nk          The input file is split into pieces n x 1024 bytes
                          in size.  No space separates the n from the k.

           -b nm          The input file is split into pieces n x 1048576
                          bytes in size.  No space separates the n from the
                          m.

           -n             The input file is split into pieces n lines in
                          size.  This option is obsolescent and is
                          equivalent to using the -l line_count option.

 EXTERNAL INFLUENCES

    International Code Set Support
      Single- and multi-byte character code sets are supported with the
      exception that multi-byte-character file names are not supported.

 SEE ALSO
      bfs(1), csplit(1).

 STANDARDS CONFORMANCE
      split: SVID2, SVID3, XPG2, XPG3

0
 

Author Comment

by:nwaltham
ID: 1639190
Excellent, thank you very much
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question