Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash iterate over lines of a file

while read p; do
  echo "$p"
done <peptides.txt
Comment

bash loop lines in file

#!/bin/bash
filename='peptides.txt'
echo Start
while read p; do 
    echo $p
done < $filename
Comment

bash for each line of file

while read p; do
  echo "$p"
done <peptides.txt
Comment

read file line loop in bash

for word in $(cat peptides.txt); do echo $word; done
Comment

PREVIOUS NEXT
Code Example
Shell :: python on pop os 
Shell :: github visualise branches 
Shell :: sudo npm cache clean -f 
Shell :: error: unknown command "neat" for "kubectl" 
Shell :: install composer in ubantu 20 
Shell :: ubuntu alien install 
Shell :: iis reset command 
Shell :: how to deploy on heroku 
Shell :: ubuntu dns config 
Shell :: virtualbox kernel driver not installed ubuntu 
Shell :: ubuntu know username 
Shell :: powershell check if command exists 
Shell :: how to upload code to github 
Shell :: installing preload in ubuntu 
Shell :: install native run 
Shell :: create batch file to delete folders 
Shell :: powershell webrequest 
Shell :: gcloud set kubectl context 
Shell :: linux time wrong 
Shell :: install docker in kali linux 
Shell :: Install-Package MailKit 
Shell :: how to check what default browser in linux 
Shell :: Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 
Shell :: install composer package from github 
Shell :: git push u origin master 
Shell :: installing deb 
Shell :: bundle lock add platform linux 
Shell :: watch and compile scss command 
Shell :: linux mount nfs share 
Shell :: linux mount ntfs as read write 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =