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 :: speedtest linux cli 
Shell :: bash add text to file 
Shell :: git name repository 
Shell :: cargo add command not found 
Shell :: git set token 
Shell :: dotnet clean nuget cache 
Shell :: git remote url change 
Shell :: make root password kali 
Shell :: ubuntu kill port 
Shell :: bash alias 
Shell :: git pull with username and password 
Shell :: How to push code to your github repository using token authentication 
Shell :: javascript bootstrap in reactJs 
Shell :: sonarqube docker setup 
Shell :: substring replacement 
Shell :: sh declare variable 
Shell :: git remove local changes and pull 
Shell :: auto run command vim startup 
Shell :: how to install ssh in windows 10 
Shell :: bash wait for input to continue 
Shell :: redis delete keys that match pattern 
Shell :: clean remove npm with cache 
Shell :: screen recorder for ubuntu 
Shell :: getting started with sanity 
Shell :: gcc on ubuntu 20.04 
Shell :: How to install specific Laravel version using composer 
Shell :: error: The following untracked working tree files would be overwritten by merge: static/platform_images/landing_page_img.png Please move or remove them before you merge. Aborting 
Shell :: ssh keygen 
Shell :: dns_probe_finished_nxdomain linux ubuntu 
Shell :: github actions configure aws credentials 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =