Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 171
  1. You can use tac to reverse the input line wise.

  2. When you use a for loop, you get one element per each iteration.

  3. Vim tip 25: substitute flags

    Here are some of the flags you can use with the substitute command: g replace all occurrences within a matching line by default, only the first matching portion will be replaced c ask for confirmation before each replacement i ignore case for searchpattern

  4. awk '!

  5. Until Python 3.10, you had to use alternatives like the third-party regex module for possessive quantifiers and atomic grouping.

  6. Until Python 3.10, you had to use alternatives like the third-party regex module for possessive quantifiers and atomic grouping.

  7. Here are some commands you can use in Normal mode to move within the current file: gg move to the first non-blank character of the first line G move to the first non-blank character of the last line 5G move to the first non-blank character of the fifth li…

  8. The stat command is useful to get details like file type, size, inode, permissions, last accessed and modified timestamps, etc.

  9. The split() method splits a string based on the given substring and returns a list.

  10. Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic.

  11. The syntax for g command (short for global) is shown below: :[range]g[lobal]/{pattern}/[cmd] This command is used to edit lines that are first filtered based on a searchpattern.

  12. This TUI application is intended as an interactive playground for Python Regular Expressions.

  13. The R command provided by GNU sed is very similar to r with respect to most of the rules seen in an earlier tip.

  14. The insert() list method helps to insert an object before the given index.

  15. Definitions from :h word and :h WORD are quoted below to explain the difference between word and WORD. word A word consists of a sequence of letters, digits and underscores, or a sequence of other non-blank characters, separated with white space (spaces,…

  16. Enable the globstar option to recursively match filenames within a specified path.

  17. Many operations on container objects can be defined in terms of these three concepts.

  18. Multiple files can be opened in Vim within the same tab page and/or in different tabs.

  19. While writing scripts, sometimes you just need to know if a file contains the pattern and act based on the exit status of the command.

  20. Python Regex Surprises

    In this post, you'll find a few regular expression examples that might surprise you.

  21. These commands allow you to move based on a single character search, within the current line only. f( move forward to the next occurrence of character ( fb move forward to the next occurrence of character b 3f" move forward to the third occurrence of char…

  22. You can use the -i option with GNU awk to load libraries.

  23. 2022: year in perspective

    TL;DR: Published two programming ebooks, wrote several blog posts, recorded plenty of Youtube videos, newsletter prospered, improved Twitter audience, read 100+ novels, and so on.

  24. You can use the sort() method for sorting lists inplace.

  25. Multiple files can be opened in Vim within the same tab page and/or in different tabs.

  26. These two commands will help you convert tabs to spaces and vice versa.

  27. Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic.

  28. JSON (JavaScript Object Notation) is one of the ways you can store and retrieve data necessary for functioning of an application.

  29. Here are Normal mode commands you can use to move within long lines that are spread over multiple screen lines: g0 move to the beginning of the current screen line g^ move to the first non-blank character of the current screen line g$ move to the end of t…

  30. CLI tip 19: extended globs

    The Bash shell provides extglob option for advanced pattern matching of filenames.

  31. Hello!

  32. Here are five string methods you can use for changing the case of characters.

  33. Last week, I finally started exploring textual.

  34. I've previously written about events and strategies that led to increased ebook sales during the last quarter of 2021.

  35. Vim tip 17: setting options

    From :h options.txt: Vim has a number of internal variables and switches which can be set to achieve special effects.

  36. The r command accepts a filename as argument and when the address is satisfied, entire contents of the given file is added after the matching line.

  37. The print() function can accept zero or more values separated by a comma.

  38. Vim tip 16: terminal mode

    Terminal mode is one way to use shell commands from within Vim.

  39. Consider these sample input files that are already sorted and the default output from comm: $ paste colors_1.txt colors_2.txt Blue Black Brown Blue Orange Green Purple Orange Red Pink Teal Red White White $ comm colors_1.txt colors_2.txt

  40. One of the ways to count the frequency of items is to make use of the dict.get() method: >>> vehicles = ['car', 'jeep', 'car', 'bike', 'bus', 'car', 'bike'] >>> hist = {} >>> for v in vehicles: ...

  41. Here are some of the Normal mode commands for moving within the current line: 0 move to the beginning of the current line (i.e. column number 1) you can also use the Home key ^ move to the beginning of the first non-blank character of the current line (us…

  42. CLI tip 16: transpose tables

    GNU datamash has plenty of nifty features for field based operations.

  43. The pop() method removes the last element of a list by default.

  44. You can have multiple windows within the same tab page.

  45. You can use brace expansion for generating a sequence of numbers and alphabets. printf helps you to display multiple arguments using the same format specifier.

  46. The str.translate() method accepts a table of codepoints (numerical value of a character) mapped to another character or codepoint.

  47. It is way too easy to repeat the last change you made: . the Normal mode dot command repeats the last change you can also use a number prefix to override the count of the last change For example, if the last change was 2dd (delete current line and the line

  48. You can use mkdir -m instead of creating a directory with mkdir first and then changing the directory permissions with the chmod command.

  49. This post lists my programming ebooks with details like PDF/EPUB purchase links, GitHub repos, web versions, testimonials, etc.

  50. You can assign the individual elements of a sequence to multiple variables.