In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to solve the problem of bash:!: event not found in the Linux operating system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Short string transcoding / decoding test
Normal transcoding (after testing, the result of single quotation mark, double quotation mark or no quotation mark):
[root@db5 ~] # echo 123456 | base64MTIzNDU2Cg== [root@db5 ~] # echo '123456' | base64MTIzNDU2Cg== [root@db5 ~] # echo "123456" | base64MTIzNDU2Cg== normal decoding: [root@db5 ~] # echo MTIzNDU2Cg== | base64-d123456 [root@db5 ~] # echo' MTIzNDU2Cg==' | base64-d123456 [root@db5 ~] # echo "MTIzNDU2Cg==" | base64-d123456
Long string transcoding / decoding test (double quotation marks are recommended. Characters such as single quotation marks will appear in the text and parse into strings)
Normal transcoding:
[root@db5 ~] # echo "May you have enough happiness to make you sweet,enough trials to make you strong,enough sorrow to keep you human,enough hope to make you happy? Always put yourself in others'soes.If you feel that it hurts you,it probably hurts the other person, too." | base64TWF5IHlvdSBoYXZlIGVub3VnaCBoYXBwaW5lc3MgdG8gbWFrZSB5b3Ugc3dlZXQsZW5vdWdoIHRyaWFscyB0byBtYWtlIHlvdSBzdHJvbmcsZW5vdWdoIHNvcnJvdyB0byBrZWVwIHlvdSBodW1hbixlbm91Z2ggaG9wZSB0byBtYWtlIHlvdSBoYXBweT8gQWx3YXlzIHB1dCB5b3Vyc2VsZiBpbiBvdGhlcnPigJlzaG9lcy5JZiB5b3UgZmVlbCB0aGF0IGl0IGh2cnRzIHlvdSxpdCBwcm9iYWJseSBodXJ0cyB0aGUgb3RoZXIgcGVyc29uLCB0b28uCg==
Normal decoding:
[root@db5 ~] # echo "TWF5IHlvdSBoYXZlIGVub3VnaCBoYXBwaW5lc3MgdG8gbWFrZSB5b3Ugc3dlZXQsZW5vdWdoIHRy > aWFscyB0byBtYWtlIHlvdSBzdHJvbmcsZW5vdWdoIHNvcnJvdyB0byBrZWVwIHlvdSBodW1hbixl > bm91Z2ggaG9wZSB0byBtYWtlIHlvdSBoYXBweT8gQWx3YXlzIHB1dCB5b3Vyc2VsZiBpbiBvdGhl > cnPigJlzaG9lcy5JZiB5b3UgZmVlbCB0aGF0IGl0IGh2cnRzIHlvdSxpdCBwcm9iYWJseSBodXJ0 > cyB0aGUgb3RoZXIgcGVyc29uLCB0b28uCg==" | base64-dMay you have enough happiness to make you sweet,enough trials to make you strong,enough sorrow to keep you human,enough hope to make you happy? Always put yourself in others'shoes.If you feel that it hurts you,it probably hurts the other person, too.
Long string transcoding specification-wrap parameter test * *
Specify the-wrap=0 parameter when transcoding, and do not wrap the line after transcoding
[root@db5 ~] # echo "May you have enough happiness to make you sweet,enough trials to make you strong,enough sorrow to keep you human,enough hope to make you happy? Always put yourself in others'ses.If you feel that it hurts you,it probably hurts the other person, too." | base64-- wrap=0TWF5IHlvdSBoYXZlIGVub3VnaCBoYXBwaW5lc3MgdG8gbWFrZSB5b3Ugc3dlZXQsZW5vdWdoIHRyaWFscyB0byBtYWtlIHlvdSBzdHJvbmcsZW5vdWdoIHNvcnJvdyB0byBrZWVwIHlvdSBodW1hbixlbm91Z2ggaG9wZSB0byBtYWtlIHlvdSBoYXBweT8gQWx3YXlzIHB1dCB5b3Vyc2VsZiBpbiBvdGhlcnPigJlzb2VzLklmIHlvdSBmZWVsIHRoYXQgaXQgaHVydHMgeW91LGl0IHByb2JhYmx5IGh2cnRzIHRoZSBvdGhlciBwZXJzb24sIHRvby4K [root@db5 ~] #
Normal decoding:
[root@db5 ~] # echo "TWF5IHlvdSBoYXZlIGVub3VnaCBoYXBwaW5lc3MgdG8gbWFrZSB5b3Ugc3dlZXQsZW5vdWdoIHRyaWFscyB0byBtYWtlIHlvdSBzdHJvbmcsZW5vdWdoIHNvcnJvdyB0byBrZWVwIHlvdSBodW1hbixlbm91Z2ggaG9wZSB0byBtYWtlIHlvdSBoYXBweT8gQWx3YXlzIHB1dCB5b3Vyc2VsZiBpbiBvdGhlcnPigJlzb2VzLklmIHlvdSBmZWVsIHRoYXQgaXQgaHVydHMgeW91LGl0IHByb2JhYmx5IGh2cnRzIHRoZSBvdGhlciBwZXJzb24sIHRvby4K" | base64-dMay you have enough happiness to make you sweet,enough trials to make you strong,enough sorrow to keep you human,enough hope to make you happy? Always put yourself in others'soes.If you feel that it hurts you,it probably hurts the other person, too.
It is explained here that for long string transcoding, different transcoding results can be obtained by making it clear that the Nth character is followed by a line break (or not). However, the results of decoding different transcoding values are the same, which are all the original strings.
Special character transcoding / decoding test * *
If it is a special character
[root@db5 ~] # echo! | base64IQo= [root@db5 ~] # echo'!'| base64IQo= [root@db5 ~] # echo "!" | base64-bash:!: event not found if it is multiple special characters [root@db5 ~] # echo! @ | base64-bash:! @: event not found [root@db5 ~] # echo'! @'| base64IUAK [root@db5 ~] # echo "! @" | base64-bash:! @: event not found
It is stated here that single quotation marks should be used when transcoding special characters.
Solve the problem of-bash:!: event not found
To solve the problem of-bash:!: event not found, you can execute the set + H command (set command parameter:-H Shell is available "!" Add the way to execute the instructions recorded in history. )
[root@db5 ~] # echo "!" | base64-bash:!: event not found [root@db5 ~] # echo! @ | base64-bash:! @: event not found [root@db5 ~] # echo "! @" | base64-bash:! @: event not found [root@db5 ~] # set + H [root@db5 ~] # echo "!" | base64IQo= [root@db5 ~] # echo! @ | base64IUAK [root@db5 ~] # echo "! @" | base64IUAK "Linux operation This is the end of the content of how to solve the problem of bash:!: event not found. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.