Use another FD.
while read line; do
if ! read -u 3 line2
then
break
fi
echo "$line***$line2"
done < file1.csv 3< file2.csv
More Related Contents:
- How do I tell if a regular file does not exist in Bash?
- How can I check if a program exists from a Bash script?
- How to mount a host directory in a Docker container
- Why equal to operator does not work if it is surrounded by space?
- Set environment variables from file of key/value pairs
- Capturing Groups From a Grep RegEx
- Jq to replace text directly on file (like sed -i)
- Shell redirection i/o order
- Integer ASCII value to character in BASH using printf
- Loop through all the files with a specific extension
- Colorized grep — viewing the entire file with highlighted matches
- How to pass in password to pg_dump?
- Use Bash to read line by line and keep space
- How can you run a command in bash over and over until success?
- Minimal web server using netcat
- How do I write a ‘for’ loop in Bash?
- Hexadecimal To Decimal in Shell Script
- How to run two commands with sudo?
- bash zcat head causes pipefail?
- How to schedule to run first Sunday of every month
- Passing a variable to a remote host in a bash script with ssh and EOF [duplicate]
- Getting “sed error – illegal byte sequence” (in bash) [duplicate]
- How do I properly escape data for a Makefile?
- how to delete the duplicate lines in file except the first matched line
- Difference between wait and sleep
- How to get the first line of a file in a bash script?
- Save file to specific folder with curl command
- Assign output to variable in Bash [duplicate]
- How to get the nth positional argument in bash?
- Is there a way to get my emacs to recognize my bash aliases and custom functions when I run a shell command?