Hacker News new | past | comments | ask | show | jobs | submit | m463's comments login

I learned about $_

  echo abc && echo $_
  abc
  abc

except it's used with wget...

  wget URL && tar -xvf $_
does this work? Shouldn't tar take a filename?

hmm... also, it says there is an alpine layer with "FROM scratch"??


$_ is the last argument. Here's a better example to illustrate

  > echo 'Hello' 'world' 'my' 'name' 'is' 'godelski'
  Hello world my name is godelski
  > echo $_
  godelski
  > !:0 !:1 !:2 "I'm" "$_"
  Hello world I'm godelski
The reference manual is here[0] and here's a more helpful list[1]

One of my favorites is

  > git diff some/file/ugh/hierarchy.cpp
  > git add $_
  ## Alternatively, but this is more cumbersome (but more flexible)
  !!:s^diff^add
So what is happening with wget is

  > wget https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz && tar -xvf $_
  ## Becomes
  > wget https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz
  > tar -xvf https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz
Which you are correct, doesn't work.

It should actually be something like this

  > wget https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz -O alpine.tar.gz && tar xzf $_
This would work as the last parameter is correct. I also added `z` to the tar and removed `-` because it isn't needed. Note that `v` often makes untaring files MUCH slower

[0] https://www.gnu.org/software/bash/manual/html_node/Bash-Vari...

[1] https://www.gnu.org/software/bash/manual/html_node/Variable-...


If you want to add in another bash trick called Parameter Expansion[0] you can parse out the filename automatically with the special variable $_. Something like:

  > wget https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz && tar xzf ${_##*/}
[0] https://www.gnu.org/software/bash/manual/html_node/Shell-Par...

It's not an alpine layer, it's a Dockerfile construct representing basically an empty tar file layer: <https://docs.docker.com/build/building/base-images/#create-a...> and <https://github.com/moby/moby/pull/8827>

I kind of suspect some of these companies probably have more horsepower and bandwidth in one crawler than a lot of these projects have in their entire infrastructure.

> In what world

the land of spherical cows...

reminds me of https://www.folklore.org/Negative_2000_Lines_Of_Code.html


I like your resolution.

That said, subscriptions could also be opt-in for renewal.

I think all of this is friction over a bad/predatory business model.


I kind of wonder if there could be some kind of antagonistic pricing checks, by finding parties opposed to inaccuracies.

For example, actuaries have to be accurate about the costs of using a vehicle. If their estimate is too low, the insurance company will lose money. If they are too high, they will lose business to competitors.

But probably insurance companies are not the opposed party, because they will sell more insurance, and losses may be lower than inflated costs.

On a different note, california prop 13 has made people keep their house longer or forever.


Longer yes. Forever no.

Also you don't need a proposition in your constitution to affect the same outcome. Where I live they almost never do reassessments, so we effectively have the same result.

The great thing about having states is that we can experiment with lots of different models of how to run society. If you don't like your particular, society then you can move to a different one.


As to forever, I kind of wonder what you could do with a trust.

and I suspect that you could rent a house with prop-13 taxes making more profit compared to renting houses that have recently changed hands.

(don't actually know the details of this)


"Sure, there were some pretty brutal ‘all-dayers’."

lol - fast or cheap, pick one.


It seems like it is fraud perpetrated against specific people who have their social security deposits redirected, instead of payments to fake people.

Don’t get me wrong I’m not trying to say we shouldn’t attempt to mitigate fraud. I’m saying that when presented with a problem it is important to apply a cost benefit analysis to the solution. This problem is relatively small. The proposed solution is very heavy handed. That makes me question the rationality of the solution.

This is an interesting thought.

Maybe "there's an app for that" will become "there's an AI for that" for any task or subject.


exactly!

If you find the right person when you're older, that's a common thought.

I would write it as "Customers can be bombarded with extra-cost upgrade and subscription offers throughout the life of the vehicle"

Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: