Here is a bash script that will encrypt a file using the openssl command-line tool and save the resulting file with the extension .enc:

```bash
#!/bin/bash
 
# Check if filename was passed as an argument
if [ $# -eq 0 ]; then
  echo "Usage: encrypt.sh [filename]"
  exit 1
fi
 
# Get filename from arguments
filename=$1
 
# Encrypt file
openssl aes-256-cbc -salt -in "${filename}" -out "${filename}.enc"
```

Save this script as "encrypt.sh" and make it executable with the command `chmod +x encrypt.sh`. To use the script, simply run it with the filename of the file you wish to encrypt as the argument. For example:

```bash
./encrypt.sh myfile.txt
```

This will encrypt the file "myfile.txt" using the aes-256-cbc cipher with a salt, and save the result in a new file called "myfile.txt.enc".
Scrivi uno script bash per crittografare un file utilizzando lo strumento da riga di comando openssl e salva il risultato in un nuovo file con estensione .enc.