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 :: bash get hour 
Shell :: purge apache 2 
Shell :: how to install pgzrun 
Shell :: downgrade react 18 to 17 
Shell :: set go111module= on 
Shell :: install dependencies @material-ui/lab/Rating 
Shell :: react native expo install 
Shell :: Clear powershell console history 
Shell :: check git version linux 
Shell :: pytorch install using conda 
Shell :: upgrade nltk version 
Shell :: composer remove package 
Shell :: git push existing repo 
Shell :: pm2 run next js 
Shell :: killall command not found ubuntu 
Shell :: vlc download for linux 
Shell :: shebang unix 
Shell :: kali linux virtualbox password 
Shell :: ubuntu top bar hide 
Shell :: get mac address ubuntu 
Shell :: swapping of two numbers without using third variable in shell script 
Shell :: uninstall cortana 
Shell :: Unable to lock directory /var/lib/apt/lists/ 
Shell :: clone specific branch 
Shell :: git rename branch 
Shell :: bash read a file line by line 
Shell :: git rename remote branch 
Shell :: how to install soapui on ubuntu 
Shell :: git diff ignore spaces and tabs 
Shell :: how to install gnome user theme extension terminal 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =