Hot answers tagged

2

I suggest using instead of the problematic goosh to use the links package. A script/alias such as the following can call it with a query parameter consisting of multiple words (spaces are converted to plus): links "google.com/search?q=$(echo $@ | sed 's/ /+/g')"


1

You can't pipe variables to sed. It doesn't matter how you're writing the back-reference – there is literally no feature in sed that would actually produce the back-reference in the way that you're trying to do. (sed only uses stdin to take the actual input text, and if you're specifying a file to edit (style.css), then stdin is not being used at all.) When ...


1

In case anyone is interested, as noted in the comments, googler relies on Python, which is available on Windows (outside the Microsoft Store releases). And light poking around led to the discovery that googler has (at least some) support on Windows itself. This means that it is (currently) possible to run googler v4.3.2 without WSL/bash/Linux on Windows 10 (...


1

Possible (suboptimal) solution: # not ideal because it requires me to realize in advance # that I will have to repeat "foo" on the same line $ (FOO="foo"; ./binary "${FOO}" "${FOO}2")


1

As per man ls: -U do not sort; list entries in directory order Otherwise the default behavior is Sort entries alphabetically if none of -cftu‐ vSUX nor --sort is specified Directory order refers to the order in which the files are internally stored in the file system. Different FS:s use different criteria, so the order depends on the FS itself.


1

I guess array is what you were looking for test=(../t1 ../t2 ../t3) ln -s "${test[@]}" . This won't break on whitespaces in array members test=("../t 1" "../t 2" "../t 3") ln -s "${test[@]}" .


Only top voted, non community-wiki answers of a minimum length are eligible