Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux write each line from file to new file

for line in $(cat file.txt); do echo "${line}" > "directory/filename_${i}.txt"; i=$(( $i + 1 )); done
Comment

PREVIOUS NEXT
Code Example
Shell :: bash change and make directory 
Shell :: git log show last 3 commits 
Shell :: rails run server 
Shell :: how to get name of pc bash script 
Shell :: way to specify single file in docker compose up 
Shell :: install dependencies and devDependencies at same time 
Shell :: nano duplicate line or copy paste line 
Shell :: log cpu usage of process linux 
Shell :: xubuntu desktop 
Shell :: homestead change php version 
Shell :: send tag to remote git 
Shell :: how to install wine-7.1.tar.xz on kali linux 
Shell :: view lubuntu-desktop from another computer 
Shell :: initiation git windows 10 
Shell :: powershell read a list of names frmo a file and red in FOR loop 
Shell :: install onnxmltools 
Php :: uninstall php ubuntu 18.04 
Php :: larave whereNotNull 
Php :: get templete uri 
Php :: PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes") laravel 8 
Php :: composer laravel ui 
Php :: typeof php 
Php :: php get user agent 
Php :: BCMath PHP Extension 
Php :: how to find php.ini 
Php :: php create file if not exist 
Php :: laravel ui auth 
Php :: woocommerce cart button shortcode 
Php :: php get youtube code from url 
Php :: livewire onkeydown 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =