Solved

Need a quick script

Posted on 1999-01-20
4
191 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php56-php-mcrypt for rhel7 php56 1 163
Centos 7 DNS server not replying to clients 3 93
AWS Linux EC2 question on group 7 85
How ldap located a Domain controller? 22 76
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

739 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