To read file content to a variable, we will provide you a bash script code. This code can handle binary data as well. It is an alternative to the cat
command.
To read file content to a variable, we will provide you a bash script code. This code can handle binary data as well. It is an alternative to the cat
command.
Code Example –
#!/bin/bash
file_data="$(<"file")"
Inspired from Dylan Araps
I am Akash Mittal, an overall computer scientist. If you want to guest post, need help in your projects, want to advertise, Feel free to contact me at [email protected]
Get only the best articles delivered to your mail
array bash bootstrap carbon-language containers create react application CRUD docker docker containers docker images Error git short html html short javascript javascript error javascript short java short kubernetes live demo python python-short python dictionary python error python list python numpy python pandas python string React-Native react-native-short react component reactjs reactjs error react js short react native animation react router react state R Short shell solidity students svelte error svelte short top list ubuntu