TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #169 · 21 окт.

А знаете ли вы, что в Bash есть особая переменная "$_" ? Из описания можно узнать, что в переменную "$_" помещается последний аргумент последней команды. Что-то знакомое? Конечно, в Python есть примерно тоже самое. Мы знаем, что дата первого релиза Bash (8 июня 1989) несколько раньше чем первый релиз Python (20 февраля 1991). Если учесть, что по задумке автора Python это агрегация самых успешных практик отовсюду, можно ли сказать что именно эта фишка к нему пришла из Bash? Ни подтверждения ни опровержения я пока не нашел. Давайте просто считать это совпадением 😉 А как это может быть полезно в Bash? Приведу простой пример, который оценят те, кто часто работает в терминале. Допустим, нам надо создать директорию и зайти в неё. Что обычно делаем? :~$ mkdir foldername :~$ cd foldername :~/foldername$ Как это сделать в одну команду? :~$ mkdir foldername && cd foldername :~/foldername$ Уже лучше, но хочется короче, без повторов. Вот тут и пригодится наша переменная. Напомню, что в неё сохраняется последний аргумент предыдущей команды. :~$ mkdir foldername && cd $_ :~/foldername$ _________________ PS. Символы "&&"" разделяют команды и означают, что требуется выполнить вторую команду только если первая завершилась успешно. #linux#tricks

Резултати

Пронајдени 14 слични објави

Пребарај: #yeah

当前筛选 #yeah清除筛选
Mountstorm notes

@mountstorm · Post #653 · 16.07.2023 г., 04:16

That Eye Blunt Injury The incident of a blunt eye injury during a football game caused me to spend a week alone in the hospital, which led to the discovery of my sense of self. I associate mostly with being a student, as I have always been passionate about learning and developing my knowledge. However, the experience of the injury made me realize that being cautious and aware of my surroundings is also a defining part of my identity. As a student, I am constantly learning and growing, but as someone who has suffered an injury, I am also aware of my vulnerability. This experience has taught me to be more careful and attentive in my day-to-day life, especially when participating in physical activities. Overall, the experience has helped me to redefine my identity and to appreciate the importance of taking care of myself. #yeah

Hashtags

Mountstorm notes

@mountstorm · Post #170 · 30.05.2022 г., 08:15

Summer. High School graduates still have the aftertaste of the graduation party and now are preoccupied with summer holidays. While my bro, a 9th grade graduate, can chill for the entire season, he will work on his academic interests and chill. Along with participating in extracurricular summer programs, he will be reading books, however cliche it sounds. Reading a book is like investing in real-estate. As long as you get the right book/estate, you are in a slowly-but-surely growing business. No need for a solid schedule or a measurable goal - how many pages to read daily, specific deadlines - in the beginning. Planning is important, I'd say, when and if there is already a vivid picture of what exactly you need and want to read. I started the process with whatever I had in hand - a fairy-tale collection, a magazine, or a random novel. Bit by bit, it's been getting more clear what genre/author's style is mine and what book to read next. The difference between a "good" book and a "bad" one for me is the first ten pages. Asking for advice on what to read from others is also better done in later stages, I believe. Suggested books are better added to the foundation laid by you. #yeah

Hashtags

12
ПретходнаСтраница 1 од 2Следна