Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the shell development skills?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "what are the shell development skills". In the daily operation, I believe many people have doubts about the shell development skills. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what are the shell development skills?" Next, please follow the editor to study!

Generally speaking, shell command line editors use Emacs or Vi mode, that is, command line edits can be done with Emacs or Vi instructions. The default mode is Emacs mode.

Ctrl+T: swap the character where the cursor is located with the character in front of the cursor, T, which can be understood as Transfer.

Alt+T: swap the word where the cursor is currently located and the word in front of the cursor.

Ctrl+U: delete characters from the cursor to the beginning of the line; u, which can be understood as all input in front of the undo cursor.

Ctrl+Y: restores the characters deleted by Ctrl+U; y, which can be understood as yank in vim.

Ctrl+?: removes all characters, which is stronger than Ctrl+U.

Ctrl+K: delete characters from where the cursor is located until the end of the line.

Ctrl+W: delete the last word; WGrady word.

Ctrl+A: move the cursor to the beginning of the line.

Ctrl+E: move the cursor to the end of the line; Ether end.

Ctrl+C: cancel typing all.

Ctrl+H: delete a character, which is equivalent to the "delete" key, and think that the "delete" key is too far away to use this shortcut; h, can be understood as the left shift key in vim.

Ctrl+F: move the cursor one character position to the right.

Ctrl+B: move the cursor one character position to the left.

Ctrl+ left key: move the cursor to the beginning of the previous word.

Ctrl+ right key: move the cursor to the end of the next word.

Ctrl+X: jumps between the last character of the cursor and the character of the current cursor.

Alt+F: jump to the end of the word where the cursor is located.

Alt+U: uppercase changes the word in the current position of the cursor to uppercase and moves the cursor to the beginning of the next word.

Alt+L: lowercase changes the word in the current position of the cursor to lowercase and moves the cursor to the beginning of the next word.

Alt+C: capitalize the word in the current position of the cursor and move the cursor to the beginning of the next word.

^ OldString ^ NewStr: replace the string OldStr with NewStr in the previous command, for example, the previous command was ls tmp1, and ^ TMP1 ^ TMP2 is equivalent to executing ls tmp2.

~ shortcut key

Ctrl+L: clear the screen, which is equivalent to typing clear.

Ctrl+R: search command history, search results with the most recently executed command first, also known as reverse search.

The last argument of the last command executed by Alt+.:, and if the previous command has no arguments, the previous command is displayed.

Ctrl+P: the forward browse history command is similar to the one on the keyboard like ↑.

Ctrl+N: the backward browse history command is similar to the one on the keyboard, ↓.

Alt+P: enter a character to find a history command that is close to the character.

Ctrl+I: similar to the Tab health completion function.

~ curly braces

Example 1:echo {big,small} SB

Terminal display: bigSB smallSB

Note: do not add spaces to the characters in curly braces, closing parentheses and adjacent characters.

Example 2:cp {filea,fileb} dir

The above command is equivalent to: cp filea dir;cp filrb dir

~ Control character

Ctrl-C terminates the foreground process Kill foreground process

Ctrl-Z suspends foreground process Suspend foreground process

Ctrl-D terminates terminal input, exits shell Terminate input, or exit shell

Ctrl-S suspends output Suspend output

Ctrl-Q restart output Resume output

Ctrl-O ignores output Discard output

Ctrl-L clear screen Clear screen

You can use the stty command, stty-a, to view or set the terminal's control characters

At this point, the study of "what are the shell development skills" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report