Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Shell read file line by line

while read line; do    
    echo $line    
done < file.txt
Comment

bash read file line by line

#!/bin/bash
while read line
do
  echo $line
done < /path/to/file
Comment

PREVIOUS NEXT
Code Example
Shell :: bsd vs linux 
Shell :: change wp permission ubuntu 
Shell :: give full permission to folder in ubuntu 
Shell :: set environamnt variable in service linux 
Shell :: yarn install chocolatey 
Shell :: apache google 2fa 
Shell :: delete local branches not on remote 
Shell :: remove mariadb 
Shell :: install git ubuntu 
Shell :: create tar 
Shell :: ansible command not found after pip install macos 
Shell :: git change email 
Shell :: nuget install location 
Shell :: echo aws profile 
Shell :: scanf not working in vscode 
Shell :: bash echo can create file 
Shell :: yarn download windows 
Shell :: start docker at boot 
Shell :: change git remote 
Shell :: how to restart docker linux 
Shell :: windows make 
Shell :: git reset to latest commit 
Shell :: show saved wifi password windows 11 
Shell :: kubernetes archlinux install 
Shell :: sync show progress 
Shell :: reverse shell bash 
Shell :: update software in ubuntu 
Shell :: batch copy silent 
Shell :: installing vs code in ubuntu 
Shell :: how to stop docker service windows 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =