force symbolic only links [closed] - bash

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
So, I had a brainfart and deleted some hardlinks (and the linked files as well). I don't normally use hard links, so is there a better way to force symbolic links by default than
alias ln='ln -s'
in my ~/.bashrc
?

I suggest in this case, you create alias with another name, otherwise when you really want to create a hard-link, you have to type \ln ... (or link)
if you have
alias lns='ln -s'
you could usually type lns ... for symbolic links, when you need to create hard link, you could type ln.... also you still have possibility to exercise typing ln -s ... manually....
hope it helps

Related

Where to put constants shared by multiple files with package scope? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I have a Go package that declares and uses some constants in file1.go. Now I add a new file to the package, file2.go, which refers to constants in file1.go.
Would you move the shared constants into a new file, like consts.go, since they don't "belong" to one file or the other? Or do you leave them in file1.go and assume that someone looking at file2.go can use their IDE or editor or grep to locate the shared constants?
Using const.go file is an idiomatic way, see Go standard library.
For example see: math/const.go

What are the advantages/disadvantages of using "SHC" to convert script to binary file [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What are the advantages / disadvantages of converting a shell script into a binary file?
I have done that and when I run the binary file on another linux it doesn't run.
it gives this error
version 'GLIBC_2.14' not found (required by ./test.sh.x)
on another server it gives this ./test.sh.x: Invalid argument.
The script only does a echo "hello"
The only 'advantage' is obfuscation, the disadvantages numerous as the examples in your question show.
If you're using it to hide secrets (passwords) they are easy to extract anyway.

Identifying and adapting unix-"isms" to the Windows command prompt [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In the Python Pyramid tutorial, I encountered this phrase:
"Windows users will need to adapt the Unix-isms below to match their environment."
It appears to relate to the "Export" command, but I am not entirely sure. The question therefore, is how do others go about this process of identifying and adapting "Unix-isms"? My only method so far is to see what isn't recognized, and obviously that could be due to different reasons.
Regarding research, I may have found a paywalled explanation for export specifically, but I'm sure there are better resources for adapting these commands.
Thank you!
The $ symbol is a Unix prompt
The ; is a command separator
export sets sets an environment variable, similar to setx
PATH=/path/to/tutorial_workspace/venv/bin:$PATH is modifying the PATH environment variable, similar to PATH=/path/to/tutorial_workspace/venv/bin;%PATH%
which searches the PATH for a program and returns its location.

Following programming styles -- update poor adherence? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a project I am working on that is written in Python. The variable/class/function/everything names do not adhere to the Python style guide.
example: a variable might be called myRandomVariable instead of the proper: my_random_variable
My question is, is it worth combing through all the code (around 10,000 lines) to fix all the naming convention problems or should I just say, 'the heck with it -- it works'?
Thanks
Edited to give example
Just because there is a Python style guide, it does not mean that all Python code should adhere to it. The most important thing to consider in a code base is that it's consistent with itself, at LEAST on a per-file basis, preferably across the project!
I would vote for your second option. They are just styles. Everyone will have their own style. You don't need to be in compilance with defined styles to say your product is great.

unset path in windows [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
how can I remove enry from the PATH in windows, to set path I need to use SET PATH command but I can't find what do I need to do remove some entry from the path (UNSET PATH is not working), thanks in advance
P.S. from command line in windows
You can't remove an individual item from an environment variable. You have to read in the current value, parse it, remove what you want to remove, and then reset the variable.
If you aren't doing this in code then I can recommend Rapid Environment Editor as an excellent tool to make this work easy.

Resources