Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

split text file into multiple files bash

#Split a file into 5 files. File is split such that each split has same size (except the last split):
split -n 5 filename
Comment

bash split file into multiple files

# Basic syntax:
split --lines=1000 --numeric-suffixes --suffix-length=2 input_file output_file_prefix
# Where:
#	- --lines=# is the number of lines to include per split file
#	- --numeric-suffixes tells split to use numbers on the output filenames
#	- --suffix-length=# tells split to use a numeric length of #, 
#		E.g. 2 = 00, 01, 02...
#	- output_file_prefix is the first part of the filename for every 
#		output file
Comment

PREVIOUS NEXT
Code Example
Shell :: update git repo local 
Shell :: linux open current directory in gui 
Shell :: anaconda install selenium 
Shell :: setup aws cli ubuntu 
Shell :: install ext-pdo_sqlite 
Shell :: cshell find file by name 
Shell :: vokoscreen ubuntu 
Shell :: virtualenv-win remove installed virtual environment 
Shell :: installing saas in react application 
Shell :: mac m1 error running pod install 
Shell :: open wsl as root 
Shell :: ubuntu trash folder 
Shell :: office 2016 activation crack 
Shell :: git ignore still tracking 
Shell :: cmake version comand 
Shell :: sequlize create new migraion 
Shell :: linux how to check what gpu 
Shell :: delete distro 
Shell :: how to shutdown ubuntu 
Shell :: aws cloudfront invalidation cli 
Shell :: how to get the size of directory in linux 
Shell :: tor ubuntu 
Shell :: how to install winget tool on powershell 
Shell :: how to kill port in linux 
Shell :: snap store fedora 
Shell :: find and replace in all files in directory centos 
Shell :: restart docker daemon windows 
Shell :: gitlab set ssh key 
Shell :: linux rename folder add suffix 
Shell :: python venv windows 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =