Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
You can use tac to reverse the input line wise.
-
When you use a for loop, you get one element per each iteration.
-
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
-
awk '!
-
Until Python 3.10, you had to use alternatives like the third-party regex module for possessive quantifiers and atomic grouping.
-
Until Python 3.10, you had to use alternatives like the third-party regex module for possessive quantifiers and atomic grouping.
-
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…
-
The stat command is useful to get details like file type, size, inode, permissions, last accessed and modified timestamps, etc.
-
The split() method splits a string based on the given substring and returns a list.
-
Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic.
-
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.
-
This TUI application is intended as an interactive playground for Python Regular Expressions.
-
The R command provided by GNU sed is very similar to r with respect to most of the rules seen in an earlier tip.
-
The insert() list method helps to insert an object before the given index.
-
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,…
-
Enable the globstar option to recursively match filenames within a specified path.
-
Many operations on container objects can be defined in terms of these three concepts.
-
Multiple files can be opened in Vim within the same tab page and/or in different tabs.
-
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.
-
In this post, you'll find a few regular expression examples that might surprise you.
-
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…
-
You can use the -i option with GNU awk to load libraries.
-
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.
-
You can use the sort() method for sorting lists inplace.
-
Multiple files can be opened in Vim within the same tab page and/or in different tabs.
-
These two commands will help you convert tabs to spaces and vice versa.
-
Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic.
-
JSON (JavaScript Object Notation) is one of the ways you can store and retrieve data necessary for functioning of an application.
-
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…
-
The Bash shell provides extglob option for advanced pattern matching of filenames.
-
Hello!
-
Here are five string methods you can use for changing the case of characters.
-
Last week, I finally started exploring textual.
-
I've previously written about events and strategies that led to increased ebook sales during the last quarter of 2021.
-
From :h options.txt: Vim has a number of internal variables and switches which can be set to achieve special effects.
-
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.
-
The print() function can accept zero or more values separated by a comma.
-
Terminal mode is one way to use shell commands from within Vim.
-
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
-
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: ...
-
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…
-
GNU datamash has plenty of nifty features for field based operations.
-
The pop() method removes the last element of a list by default.
-
You can have multiple windows within the same tab page.
-
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.
-
The str.translate() method accepts a table of codepoints (numerical value of a character) mapped to another character or codepoint.
-
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
-
You can use mkdir -m instead of creating a directory with mkdir first and then changing the directory permissions with the chmod command.
-
This post lists my programming ebooks with details like PDF/EPUB purchase links, GitHub repos, web versions, testimonials, etc.
-
You can assign the individual elements of a sequence to multiple variables.