Sponsored links: Algebra eBooks
 

Related

printfile

printfile("/etc/passw...

Calculate

printfile

? printfile;

Calculate

printfile

printfile ("/etc/pass...

Calculate

printfile

printfile("/etc/passw...

Calculate

printfile

? printfile;

Calculate

printfile

printfile ("/etc/pass...

Calculate

printfile

Run Example
(%i1)printfile ("/etc/passwd");
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
sshd:x:101:65534::/var/run/sshd:/usr/sbin/nologin
messagebus:x:102:104::/var/run/dbus:/bin/false
tomcat6:x:103:105::/usr/share/tomcat6:/bin/false
couchdb:x:104:106:CouchDB Administrator,,,:/var/lib/couchdb:/bin/bash
maxws:x:1000:1000::/home/maxws:/bin/bash
(%o1)                             /etc/passwd
(%i2) 
Run Example
? printfile;

 -- Function: printfile (<path>)
     Prints the file named by <path> to the console.  <path> may be a
     string or a symbol; if it is a symbol, it is converted to a string.

     If <path> names a file which is accessible from the current
     working directory, that file is printed to the console.  Otherwise,
     `printfile' attempts to locate the file by appending <path> to
     each of the elements of `file_search_usage' via `filename_merge'.

     `printfile' returns <path> if it names an existing file, or
     otherwise the result of a successful filename merge.


(%o1)                                true
(%i2) 
Run Example
eq1:x*4+y-2=y;
(%o1)                           y + 4 x - 2 = y
(%i2) eq2:x+2=y;
(%o2)                              x + 2 = y
(%i3) linsolve([eq1,eq2],[x,y]);
                                     1      5
(%o3)                           [x = -, y = -]
                                     2      2
(%i4) printfile ("/etc/passwd");
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
sshd:x:101:65534::/var/run/sshd:/usr/sbin/nologin
messagebus:x:102:104::/var/run/dbus:/bin/false
tomcat6:x:103:105::/usr/share/tomcat6:/bin/false
couchdb:x:104:106:CouchDB Administrator,,,:/var/lib/couchdb:/bin/bash
maxws:x:1000:1000::/home/maxws:/bin/bash
(%o4)                             /etc/passwd
(%i5) 

Related Help

Help for Printfile