Help for this page

Select Code to Download


  1. or download this
    #include <unistd.h>
    #include <stdio.h>
    ...
    
       return 0;
    }
    
  2. or download this
    [~/sym1]$ gcc -Wall -Wextra -pedantic a.c -o a && ./a
    Current working dir: /home/ikegami/dir1
    
  3. or download this
    [~/sym1]$ readlink /proc/$$/cwd
    /home/ikegami/dir1
    
  4. or download this
    #include <unistd.h>
    #include <stdio.h>
    ...
    
       return 0;
    }
    
  5. or download this
    [~/sym1]$ gcc -Wall -Wextra -pedantic a.c -o a && ./a
    Current working dir: /home/ikegami/dir1
    
  6. or download this
    use 5.010;
    use Path::Tiny qw( path );
    say path($0)->absolute($ENV{PWD});
    
  7. or download this
    [~/sym1]$ perl a.pl
    /home/ikegami/sym1/a.pl