Advertisement
v1ral_ITS

split_small- shell script for splitting files larger than 4

Jul 14th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.13 KB | None | 0 0
  1. split_small() {
  2.     # FUNCTION #
  3.     VAR_0() {
  4.         echo -e $orange”Please now type in the destination \nIncluding the file name that you would to be segmented \n[DEST:][FILENAME.ext]=”
  5.         read VAR0
  6.     }
  7.     VAR_I() {
  8.         Echo -e $red”Now this will ve the source destination, \nFor the segmented files. \nGenerally speaking the external hard drive you are trying to get this large file backed up to. \n[SOURCE>DEST:]= “
  9.         Read VAR1
  10.         }
  11.     # VARIABLES #
  12.     S-’sudo
  13.     # TO PROVIDE THE PROGRAM WITH ELEVATED PRIVILEGES NEEDED TO ENSURE COMMAND COMPLETION
  14.     P=’split
  15.     # THE TERMINAL COMMAND LINE BINARY WE WILL BE USING
  16.     B=’--bytes=1G’
  17.     # THE SEGMENTED PORTIONS FILE SIZE
  18.     Echo -e “This script runs the split command line, \nExcept ran through here it is highly simplified and user friendly: \nv1ral <Imperialteksolutions@outlook.com>  \n$purple Copyright © 2018
  19.     Echo -e $gray”\nThis script is intended for the use on files of multiple gigabytes \nIt is programmed to split the chosen file into segments of 1GB \nThe split file works perfectly on large .iso’s for example \nWanting to <dd> or <cp> to an external hard drive formatted to FAT32 \nFAT32 having a file size limit on transfers \nThis makes life easy \nNot having to reformat the drive or lose any important DATA “
  20. #########
  21. # START #
  22. #########
  23.  
  24. VAR_0
  25. Echo -e $gray”To verify: \nChosen_file=$VAR0
  26. Echo-e $purple”\nVERIFY: \n1) [y]es \n<OR> \n2) [n]o ”
  27.  
  28. Read n
  29. Case $n in
  30. Echo -e $blue “Okay GREAT!;;
  31. VAR_0;;
  32. Esac
  33.  
  34. VAR_I
  35.  
  36. Echo -e $purple”To verify: \nChosen_file=$VAR1
  37. Echo-e $gray”\nVERIFY: \n1) [y]es \n<OR> \n2) [n]o ”
  38.  
  39. Read nn
  40. Case $nn in
  41. Echo -e $cyan “Okay GREAT!;;
  42. VAR_I;;
  43. Esac
  44.  
  45. $S $P $B $VAR0 $VAR1
  46.  
  47. Echo -e $orange$VAR0 is being segmented \nThe segmented pieces are being saved at \nSourcer_Dest=$VAR1 \nWorking….. “
  48. Sleep 3
  49. Echo -e $red”Program completion, \nSuccessfully!! \n\nPlease feel free to use our program compile.split, \nWhen you need to piece together the segmented file back to original: \nMade easy, made for you. \n v1ral <Imperialteksolutions@outlook.com>
  50. }
  51. Alias split=’split_small’
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement