linux - bash command to create custom named file -


simple task buy can not seem find command on http://faculty.plattsburgh.edu/jan.plaza/computing/help/commands.html

basically have string of text know , have set in variable on bash file.

i need save text file called foo.conf in desired directory.

here have far:

#!/bin/bash stringforfile='port=6000 username=user password=password' mkdir '~/.foo' # need save file foo.conf .foo directory  

many in advance

why not use echo $stringforfile > ~/.foo/foo.conf after mkdir command?


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -