Add untracked changes to git
git add <full path of changed code>
Add all files in current folder to git
git add .
Add untracked changes to git
git add <full path of changed code>
Add all files in current folder to git
git add .
String replace global in VI
:%s/search_string/replacement_string/g
delete All lines in a file
dG
delete first 30 lines in a file
// | |
public class Node | |
{ | |
public char label; | |
public boolean visited=false; | |
public Node(char l) | |
{ | |
this.label=l; | |
} | |
} |
I have been meaning to note down my *nix checklist of commands (For MacOS) which are very handy for basic operations on data. I will modify this post as and when I remember or come across something that fits here. These *nix commands are specifically tested for Mac OS.
Uniques
uniq - This is the unix unique function which can be primarily used to remove duplicates from a file amongst other things. The file has to be pre sorted for uniq to work
Consider file test which contains the following
$ cat test
aa
bb
bb
cc