Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

shell load file as 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 :: default pull settings git 
Shell :: docker sudo how to add user 
Shell :: apt install xfce 
Shell :: git pull without checkout 
Shell :: find out a branch a parent branch git 
Shell :: crontab only working days 
Shell :: vue command not found 
Shell :: install opencv 
Shell :: git change commit author 
Shell :: git merge abort 
Shell :: How to install npm in centos 
Shell :: unstage files in git 
Shell :: how to kill local server in ubuntu by command 
Shell :: bash copy file and rename 
Shell :: linux how to display current time with timezone 
Shell :: minikube start with docker driver 
Shell :: kubectl port forward 
Shell :: get size of file linux 
Shell :: ubuntu move folder to another directory 
Shell :: apt install slack 
Shell :: download torrent magnet on linux 
Shell :: linux ip addr add 
Shell :: install typeorm node 
Shell :: rot13 in bash 
Shell :: rmdir directory not empty windows 
Shell :: docker remove exited containers 
Shell :: linux how to open .x86_64 
Shell :: Error: Command failed: adb shell am start -n 
Shell :: centos install specific kernel headers 
Shell :: check time in linux 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =