#리눅스 쓸 때 ls, cd, cp, mv 같은 기본 명령어만 평소에 써서 #shellscripts 제대로 안 배우고 막 쓰는데, 간단한 #쉘스크립트 파일에서 오류가 나서 해결을 못하는 중
예를 들어 example.sh라는 파일에 이렇게 씀
for n in 1, 2
do
cd dirt-00"$n"
cp carc ../carc-00"$n"
cd ..
done
뭘 하고 싶은 거냐면, 어떤 디렉토리에 dirt-001과 dirt-002라는 두 하위 디렉토리가 있음. 두 디렉토리마다 들어가서 carc라는 이름의 파일을 원래 디렉토리에다 각각 carc-001과 carc-002로 복사하라는 건데..
그렇게 하면 dirt-001과 dirt-002라는 디렉토리가 없고 carc 파일을 찾을 수 없다는 오류가 나옴. 디렉토리가 분명 있는데 뭐가 문제지..
문자열과 숫자는 구분하지 않는다고 하고.
아시는 분들.. 도와주세요..
ADHD + debugging a shell script = “what else do I have to do?”
Does anyone know if there is a shell script equivalent of RunJS?
Which, if you don’t have it is a life saver when it comes to Javscript.
Something to let me see the results of each stage of a command so I can build up a chain without a lot of errors.
I spent the past few days dealing with UTIs so you don’t have to. Unless you really want to that is.
https://whatiswrongwithyourdog.netlify.app/posts/uti-problems/
#security #shellScripts #StupidIdeas I see a lot of newer "installers" for various projects like Rust, Homebrew, Oh-my-zsh, and more, asking people simply run a shell script from the internet. And I'm not thrilled with this; I know packages have issues too. However, a shell script seems like a prime target for malware. Can we please return to more sensible installers? PLEASE? Are we just going to default to the most insecure way of delivering software? When did this become "Normal"...
#security #shellscripts #stupidideas
Many #Microsoft #Windows users frequently find themselves:
- Frustrated by awkward, confusing, repetitive, or time-consuming workflows.
- Disappointed with the user interface and its limited customization options.
- Wishing they could just install MacOS or Linux on their machine, but can't because of hardware or policy constraints.
There are thousands of custom apps, #ShellScripts, #RegistryHacks, and other tweaks out there which we can use to make Windows more intuitive, faster, easier on the eyes, and tailor it precisely to our individual whims.
But part of the problem is that there are so many options! How do we know which ones to use? Which ones are safe to install? Stable? Actively maintained? Supported by a thriving user community? 🤯 Welcome to #AnalysisParalysis; Having too many options is roughly equivalent to having no options at all.
Fortunately, #LinusTechTips has a video that covers 95% of the mods I recommend to every Windows user. Check it out:
https://youtu.be/4GASGO0go5I
#microsoft #windows #shellscripts #registryhacks #analysisparalysis #linustechtips
Woa, I just realized, I'd have to modify hundreds of my #shellscripts if I'd switch to #NixOS because /usr/bin is basically empty and all standard tool paths are changed. 😔
Se você é fã de #scripts #linux que automatizam sua vida já deve ter ficado chateado com o fato de ter que manter uma janela de terminal aberta para rodar a sua ferramenta e saber a sua saída ou algum status a respeito de sua operação, mas isso é desnecessário. Use o notify-send para ser alertado de eventos em seus #shellscripts e deixe-os mais amigáveis.
@radehi
In the last decade, I gave up my personal distaste for #spaces and special characters in file names.
Never regrettet it.
Never had any issue, not in my zsh nor in #shellscripts which I'm using. If there is an issue, it's usually the issue of the script & is easily fixed. Therefore, I try to come up with clean code rather than avoiding side effects of code bugs by omitting spaces and special characters in my file names. After all, the computer is here for me and not vice versa.
YMMV.