I'm using Git Bash on Windows
Have you ever thought? In my case, I wanted to use the command ** rev **, but I was in trouble because it wasn't implemented in Git Bash.
I didn't understand what kind of package or library ** rev ** was in in the first place because I couldn't understand what was difficult even if I looked it up on the net. .. .. (By the way, ** Chocolatey ** seems to be useful, but I gave up because I couldn't implement it well ...)
As a result of investigating while worrying about various things
I noticed that. Quote: No installation required! Use Linux commands on Windows
** busybox ** is like ** Git Bash's relatives (or rivals?) **, and like Git Bash, it's software for implementing Linux on Windows. I'll leave the details to the link below, but it's very easy to install!
So the conclusion I came to is
about it. And if you use the file after executing ** rev ** with Git Bash again, everything will be solved! The procedure is specifically introduced below!
If you have successfully "added system environment variables" ** [[Step 2](# -Go to the directory containing the data you want to rev on the command prompt)] ** (← You can jump with the link) Please proceed to.
If adding system environment variables doesn't work, If you just use it in time for the time being, there is no problem up to the previous step. In that case, let's work in the newly generated ** busybox ** in the PC now. In this case, proceed to ** [[Step 2'](# 2-Move the data you want to rev into the busybox folder you just created manually)] **.
Next, on the command prompt, use ** cd ** to change to the directory ** (folder) that contains the ** rev data </ font>.
To do this, first use the **
pwd ** command in Git Bash to identify the directory where the ** rev data </ font> is located **.
Once you know where it is, open a ** command prompt ** and ** cd to that directory **. Now you are ready to ** rev ** </ font>. [[Go to step ③](#-execute rev on the target file)]
At this point, all you have to do is **
rev command </ font> **.
You should be able to confirm that Git Bash is doing well.
In the figure below, the text file ** want_to_rev.txt ** is
reved and output to ** run_rev.txt **. The above is the remedy. Thank you for your hard work![[For commands other than rev](For commands other than #rev)] [Conclusion]
If you did not succeed in ** adding system environment variables ** in step 1, proceed with this step.
This time, I would like to ** rev ** the contents of the text file ** want_to_rev.txt **. The contents of the file are as shown in the image.
To move a file, you first have to figure out where it is on your PC, so type
pwd on the Git Bash screen to find the location of the file.
In this case, ** / c / Users / microsoft / test_directory ** was output, so ** want_to_rev.txt in "** test_directory " folder in " microsoft " folder in " user " folder in " C: **" ** I found that there is a file.
Move this file into the (should) ** busybox ** folder that you already located in the previous step and you're ready to go. (Please move manually)
First, launch ** Command Prompt ** and use
cd busybox to move to the ** busybox ** folder.
If you execute
ls here, you can see that the data you want to ** rev ** (** want_to_rev.txt **) is in the ** busybox ** folder.
If you can confirm the existence of the file,
File name before rev> File name after rev
If so, ** rev ** files will be generated in the ** busybox ** folder.
rev want_to_rev.txt> run_rev.txt
You can see that a new ** run_rev.txt ** has been created in the ** busybox ** folder by running.
If you actually compare the files before and after ** rev ** on Git Bash, you should be able to confirm that ** rev ** is done properly.
The above is the workaround when there is no ** rev ** command. Thank you for your hard work!
Finally, I tried to find out how many commands other than ** rev ** can be solved by substituting ** busybox **.
The commands that can be used in busybox are
busybox, the commands that can be used in Git Bash are obtained with
ls / bin, and the commands that can not be used in Git Bash but can be used in ** busybox ** are listed.
Of the 153 types of commands that can be used with ** busybox **, ** 50 types of commands (excluding
busybox) correspond to them, so I will list them!
If you have any other commands that you are having trouble using, please refer to them!
(I haven't used any commands at all. Lol)
That is all for this article. How was that? This is a first aid measure for the time being, but I hope it helps.
If you find a simpler and more versatile method (such as how to implement chocolatey), I would like to introduce it again!