So I have a project which needs to create a list of numbers which then will be sum all together and more, but right now, one of my problems is that that I need to give the user the option to decide what the name of the file will be, so I have a very little knowledge of unix so help would be good
- usr/bin/bash
- clear;
- echo enter name
- read v
- cat > v
this is what I have, it's creating the file but as you can already tell, the file name will be v; any thoughts on how I can fix this code?
01 Answer
#!/bin/bash
clear
read -p "enter name" v
echo "Beginning" >$v 1