LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2021, 11:54 PM   #1
elooo
LQ Newbie
 
Registered: Nov 2021
Posts: 1

Rep: Reputation: Disabled
Can anyone please assist me with this


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.txt
 
Old 11-30-2021, 01:42 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by elooo View Post
I HAVE TRIED THIS 3 METHODS BUT STILL GETS ERRORS
What errors?

Please, read How To Ask a Question.

Last edited by shruggy; 11-30-2021 at 02:31 AM.
 
2 members found this post helpful.
Old 11-30-2021, 03:00 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Regarding assignments:
Quote:
We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sound very choppy please assist if u can nomb Linux - Software 2 08-17-2006 11:30 PM
Graphics problem, please assist. v4d3r Linux - Hardware 0 06-08-2004 12:02 PM
Newbie. Buy Linux Legally, please assist. T3 Rules Mandriva 14 02-20-2004 05:12 PM
Please assist with Mount Error. rvijay Linux - Newbie 35 10-11-2003 10:28 PM
Please assist newbie with glib question Gurtnamona Linux - Software 10 08-20-2003 01:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration