The task seems to have an issue with access rights. So it states that:
There is some data on Nautilus App Server 3
in Stratos DC
. Data needs to be altered in several of the files. On Nautilus App Server 3
, alter the /home/BSD.txt
file as per details given below:
a. Delete all lines containing word software
and save results in /home/BSD_DELETE.txt
file. (Please be aware of case sensitivity)
b. Replace all occurrence of word from
to their
and save results in /home/BSD_REPLACE.txt
file.
Note:
Let’s say you are asked to replace word to
with from
. In that case, make sure not to alter any words containing this string; for example up to
, contribu to
r etc.
This is what I have there:
$ ls -al
total 28
drwxr-xr-x 1 root root 4096 Jul 31 01:04 .
drwxr-xr-x 1 root root 4096 Jul 31 01:04 …
drwx------ 1 ansible ansible 4096 Oct 15 2019 ansible
drwx------ 1 banner banner 4096 Jan 25 2020 banner
-rw-r–r-- 1 root root 9919 Jul 31 01:04 BSD.txt
So when I try to create a file it just fails to do it due to access rights:
[banner@stapp03 home]$ touch BSD_REPLACE.txt
touch: cannot touch ‘BSD_REPLACE.txt’: Permission denied
[banner@stapp03 home]$ sed ‘s/ from / their /g/’ BSD.txt > BSD_REPLACE.txt
-bash: BSD_REPLACE.txt: Permission denied