Connect with users of Wolfram technologies to learn, solve problems and share ideas
Mark as an Answer
6 Total Likes
Follow this post
Share this post:
Is there still a "!!" function? Is it important to the learning curve?
11 years ago
While working through
Programming Paradigms via Mathematica (A First Course)
I came across this in lesson 25.
Without formally opening a file, there is a quick way to ask Mathematica what the entire contents of the file are: " !!".
Execute " !!file", where "file" is the file name (without quotation marks!), and Mathematica will simply dump the contents of the file onto the screen.
However the example that they gave failed to display any data as shown by the input and output below:
Although the rest of the section seemed to work as described:
First, let's read in a single Number, which we expect to be "1".
In:=num = Read[fileref,Number]
And so on.
I have queried the documentation center about !! and looked through information on File Operations, and have found no mention of this syntax.
I am wondering if this was a feature of the first version that has either been discontinued or changed, and also if the need to view contents of a file dumped on the screen is important in learning about files as representations of data.
11 years ago
Thank You Arnoud,
I used FilePrint["File1"] in place of !!FILE1 and it worked just as the text described. +1
Arnoud Buzing, Wolfram Research
11 years ago
This is no longer available in the frontend user interface.
It is still available when you launch the Mathematica kernel from a command line (
Mathematica 9.0 for Linux (32-bit)
Copyright 1988-2013 Wolfram Research, Inc.
(* This is a sample file *)
Note that you can use the function
to print out the content of a file as well:
Reply to this discussion
in reply to
Community posts can be styled and formatted using the
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Add a file to this post
Follow this discussion
Be respectful. Review our
to understand your role and responsibilities.
Wolfram|Alpha Notebook Edition
Volume & Site Licensing
Enterprise Private Cloud
Service Plans Benefits
Wolfram Language Documentation
Wolfram Language Introductory Book
Get Started with Wolfram
Fast Introduction for Programmers
Fast Introduction for Math Students
Webinars & Training
Connected Devices Project
Wolfram Data Drop
Wolfram + Raspberry Pi
. All rights reserved.
Learn how »