Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash temporary file

## You can use 'mktemp'

## Storing filename in a variable
## The X is replaced by random string
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
Comment

linux bash temporary file

temp_file=$(mktemp)
# do something with the file
rm ${temp_file}
Comment

bash temporary files

# The next line will create a temporary file and return its path.
path="$(mktemp)"
echo "Hello, World!" > "$path"
Comment

PREVIOUS NEXT
Code Example
Shell :: list all services linux 
Shell :: How to translate a string to md5 using bash 
Shell :: delete cache gi 
Shell :: ubuntu /not root-owned 0:1001 
Shell :: avoid this message: new password is just a wrapped version of the old one (and a few other similar messages) 
Shell :: ionic capacitor file-chooser 
Shell :: git push origin deatched hhead 
Shell :: eval assignment 
Shell :: Branching in a repository 
Shell :: install mavros on ubuntu/debian 
Shell :: sed excape all quates 
Shell :: xargs echo 
Shell :: watchman Makefile:4446: scm/watchman-Mercurial.o] Error 1 
Shell :: what is vagrant and system requirements 
Shell :: kubuntu snap app not showing 
Shell :: prepend xml to svg sed 
Shell :: docker error "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. 
Shell :: raspberry pi autostart gui application 
Shell :: where to export wsl AppData 
Shell :: uninstall maps 
Shell :: wc exclude . and .. directories and empty or commented lines 
Shell :: linux manjaro tg link 
Shell :: python tree library 
Shell :: kubernetes clusterip 
Shell :: see wifi password 
Shell :: [ERROR] An error occurred while running subprocess capacitor. 
Shell :: dlib installation 
Shell :: start with in shell script 
Shell :: install kubectl on ubuntu 
Shell :: restart command windows server 2008 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =