Solved

Need a quick script

Posted on 1999-01-20
4
180 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
  • 2
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
Comment Utility
split -b1m file
0
 

Author Comment

by:nwaltham
Comment Utility
:-) 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
Comment Utility
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
Comment Utility
Excellent, thank you very much
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now