?
Solved

Need a quick script

Posted on 1999-01-20
4
Medium Priority
?
193 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 120 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

771 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