Write a bash script that changes the owner of the file hello to betty only if it is owned by the user guillaume.
The file hello will be in the working directory
The script should not be more than two lines long and You are not allowed to use backticks, &&, || or ;
#!/bin/bash
if [ “$(stat -c ‘%U’ hello)” = “guillaume” ] then chown betty hello
New contributor
awoleye abraham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.