Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash read file into variable

# Basic syntax:
FILELINES=`cat your_file.txt`

# Example usage:
# Say you have a file "your_file.txt" containing the following sample names
# and you want to iterate over them in a bash script:
SAMPLE1
SAMPLE2
SAMPLE3
# The bash script would look like:
SAMPLES=`cat your_file.txt`
for SAMPLE in $SAMPLES; do
	echo $SAMPLE
done
Comment

PREVIOUS NEXT
Code Example
Shell :: ubuntu 20.04 how to check dns server 
Shell :: how to install anything on kali linux 
Shell :: how to exit root in linux 
Shell :: kubeadm print join command 
Shell :: git set upstream remote branch 
Shell :: intsall ifconfig mac os 
Shell :: how to update visual studio code through ubuntu terninal 
Shell :: install opencv raspberry pi 
Shell :: windows where are pip packages installed 
Shell :: ubuntu persistent root loggin 
Shell :: powershell while loop 
Shell :: how to uninstall all powershell modules 
Shell :: ext-dom missing ubuntu 
Shell :: git submodule remove 
Shell :: how to remove user from the group 
Shell :: get full path of files in directory linux command 
Shell :: kill process ubuntu 
Shell :: mac terminal unzip to directory 
Shell :: ssh config 
Shell :: powershell length of string 
Shell :: upgrade docker compose windows 
Shell :: rancher 2 on ubuntu 20.04 
Shell :: copy contents of folder to another folder in terminal 
Shell :: docker redis image 
Shell :: how to add numbers in linux command line shell 
Shell :: laravel installation from github 
Shell :: git last commit change author 
Shell :: remove upstream git 
Shell :: install bootstrap in gatsbyjs 
Shell :: pytest suppress exit code 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =