Article 5SG5M Can anyone please assist me with this

Can anyone please assist me with this

by
elooo
from LinuxQuestions.org on (#5SG5M)
1. Create a file named diff.txt inside your ~/workspace/project-log/ directory with the following format:
Version: 2.0
username: current_user
< ~/workspace directory visible content list >

2. Grep the differences between the~/workspace/project-log/changelog.txt file content against the ~/workspace/project-log/diff.txt file content and append the results to the ~/workspace/project-log/changelog.txt file

TIP: Try using autocompletion shortcuts, relative paths and string interpolation

I HAVE TRIED THIS 3 METHODS BUT STILL GETS ERRORS

METHOD 1

$ touch ~/workspace/project-log/diff.txt
$ echo "Version: 2.0" > ~/workspace/project-log/diff.txt
$ echo "username: current_user" >> ~/workspace/project-log/diff.txt
$ ls ~/workspace >> ~/workspace/project-log/diff.txt

METHOD 2

$ echo "Version: 2.0" > ~/workspace/project-log/diff.txt
$ echo "username: current_user" >> ~/workspace/project-log/diff.txt
$ ls ~/workspace >> ~/workspace/project-log/diff.txt

METHOD 3

$ echo -e "Version: 2.0" >> diff.txt echo -e "username: $(whoami)">>diff.txt ls >>~/workspace/project-log/diff.txt
$grep -v -F -x -f changelog.txt diff.txt >> changelog.txtlatest?d=yIl2AUoC8zA latest?i=r6DlpZyVXP4:NryESg_nwv8:F7zBnMy latest?i=r6DlpZyVXP4:NryESg_nwv8:V_sGLiP latest?d=qj6IDK7rITs latest?i=r6DlpZyVXP4:NryESg_nwv8:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments