I am trying to create the file and redirect the output in the same command line which is line 4 in the below program.
#!/bin/bash
read -p "Enter File Name:" value1
echo "Your File Name is $value1"
sed 's/abcd/'$value1'/g' abcd_calls > $value1_calls
This is the error it generates
./code.sh: line 4: $value1_calls: ambiguous redirect
It is not redirecting since $value1_calls such file does not exist as i want to create the file with name of input ($value1 given by user through read command) .