Answers for "bash read file with for in"

18

read file using shell script

#!/bin/bash
input="/path/to/txt/file"
while IFS= read -r line
do
  echo "$line"
done < "$input"
Posted by: Guest on February-22-2020
0

bash read options from file

#! /bin/bash

# Optionally, set default values
# var1="default value for var1"
# var1="default value for var2"

. /path/to/some.config

echo "$var1" "$var2"
Posted by: Guest on October-12-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language