diff options
-rw-r--r-- | dotrc/.bash_aliases | 2 | ||||
-rw-r--r-- | dotrc/.bashrc | 4 | ||||
-rw-r--r-- | strlen.c | 17 |
3 files changed, 23 insertions, 0 deletions
diff --git a/dotrc/.bash_aliases b/dotrc/.bash_aliases index d499ae1..ddb9651 100644 --- a/dotrc/.bash_aliases +++ b/dotrc/.bash_aliases @@ -2,6 +2,7 @@ export EDITOR=vim export VISUAL=vim alias V="vi" +alias vi=vim alias ctags="ctags --langmap=c:.c.pc" @@ -14,6 +15,7 @@ alias pss="ps -ef" alias psu="ps -f -u $LOGNAME" alias h="history" alias p="pwd" +alias start=cygstart alias wenv="env | egrep " diff --git a/dotrc/.bashrc b/dotrc/.bashrc index 3dc35e6..20eeedd 100644 --- a/dotrc/.bashrc +++ b/dotrc/.bashrc @@ -3,3 +3,7 @@ if [ "$PS1" != "" ] ; then fi test -s $HOME/.bash_aliases && . ~/.bash_aliases + +if [ ! "$(echo $PATH | fgrep $HOME/bin)" ] ; then + export PATH=$HOME/bin:$PATH +fi diff --git a/strlen.c b/strlen.c new file mode 100644 index 0000000..a7fead6 --- /dev/null +++ b/strlen.c @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +int main(int argc, char *argv[]) +{ + int f; + int len; + + for(f = 1; argv[f]; f++) + { + len = strlen(argv[f]); + printf("strlen(%s) = %d\n", argv[f], len); + } + + return EXIT_SUCCESS; +} |