Yet another pointless discussion thread...

Talk about anything you feel like talking about. Pull up a soapbox and pontificate to your heart's content. May contain some adult humour or otherwise objectionable content (NSFW). No warez, pr0n or illegal stuff.

Re: Yet another pointless discussion thread...

Postby cynwulf » November 15th, 2018, 9:48 am

Head_on_a_Stick wrote:Well, both commands produce similar output, so yes, I suppose so.

I think I prefer your version, the list is alphabetised by the shell(?), which is nice.

Well, your version was actually something like:
Code: Select all
empty@buster:~ $ cd /sys/devices/system/cpu/vulnerabilities
empty@buster:/sys/devices/system/cpu/vulnerabilities $ grep -R .

My version is the simple, one-liner method of doing the same thing you were attempting to do (hence it "cuts out the crap").

As to whether it's the "best way", that remains to be seen (personally I would generally agree with nadir and would use head(1) or tail(1) for that).
cynwulf
 
Posts: 2548
Joined: April 26th, 2011, 2:46 pm

Re: Yet another pointless discussion thread...

Postby Head_on_a_Stick » November 15th, 2018, 10:54 am

cynwulf wrote:Well, your version was actually something like:
Code: Select all
empty@buster:~ $ cd /sys/devices/system/cpu/vulnerabilities
empty@buster:/sys/devices/system/cpu/vulnerabilities $ grep -R .

My version is the simple, one-liner method of doing the same thing you were attempting to do (hence it "cuts out the crap").

Ah, now I understand.

I chose to `cd` first so that the full path would be omitted from the output so yes, good tip there, thanks.

@loqs' original version was:
Code: Select all
grep -R . /sys/devices/system/cpu/vulnerabilities

(IIRC)
Show Off
User avatar
Head_on_a_Stick
 
Posts: 163
Joined: June 16th, 2015, 8:35 pm
Location: London baby!

Previous

Return to Nonsense

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x