1. Does the Mv Command Rename a File Or Move a File? It Actually Does Both, Depending on the Context

Total Page:16

File Type:pdf, Size:1020Kb

1. Does the Mv Command Rename a File Or Move a File? It Actually Does Both, Depending on the Context 1. Does the mv command rename a file or move a file? It actually does both, depending on the context. If the source and target are both files, it does rename. If the source is a file and the target is a directory, it does move. However, once we understand the internal working of the mv command with respect to inodes, we will realize both are same. 2. Does moving a file to a directory using mv command create a new file and copy contents to it OR just move the file itself? It depends on whether the target location is in the same filesystem or a different file system. If within the same file system, it is simply a move, else the mv command creates a new file and copies the contents to it from the old file and deletes the old file. 3. Why does Unix create and copy when the target directory belongs to a different file system? In case, if the file is simply moved to the target directory as is, it may so happen that the target file system alread has a file with the same inode number as that of our source file. And hence create a new file and copy contents. 4. What is wrong if a file already exists in the target FS with the same inode number? No 2 files can have the same inode number within a file system(except hard linked files). 5. When I move a file to a different directory, does the inum still remain the same? Yes and No. As long as the directory being moved to is within the same file system, the inode number remains the same. Inode number changes on moving the file to a different file system. a) Moved to a directory in same filesystem: $ ls -li file 9962605 -rw-r--r-- 1 guru users 98 Jul 6 15:11 file $ mv file bin/file0 $ ls -li bin/file0 9962605 -rw-r--r-- 1 guru users 98 Jul 6 15:11 bin/file0 b) Moved to a directory in a different filesystem: $ ls -li file1 9962607 -rw-r--r-- 1 guru users 19 Jul 5 17:37 file1 $ mv file1 /tmp $ ls -li /tmp/file1 6161903 -rw-r--r-- 1 guru users 19 Jul 5 17:37 /tmp/file1 6. In case of renaming a file from say f1 to f2, does the inode number change? No. The inode number does not change when a file is simply renamed. $ ls -li file 9962606 -rw-r--r-- 1 guru users 98 Jul 6 15:11 file $ mv file file0 $ ls -li file0 9962606 -rw-r--r-- 1 guru users 98 Jul 6 15:11 file0 7. Say, within a directory, if a file is renamed, what exactly changes in the inode information of the source file? Nothing changes in the inode information of the source file. This is because only the file name changes as part of the rename, and the file name is not part of the inode information at all. The mapping of the inode number with the file names happen at the parent directory level. In this mapping, the file name is updated against the inode number. 8. Is the directory also is associated with an inode number? Yes, the directory is also a kind of file, a special file(Everything is a file in Unix, they say). One of the attributes of inode info is the type of file which tells whether it is a file, directory, socket, link, etc. The directory also has an inode number, and all the inode related information such as the permissions, size, owner, the group, etc.. are stored in the inode of the directory. 9. Is there any difference between the inode info contained for a file and a directory? One of the data presented in the inode is the pointer to the data blocks which is the pointer to the location containing the data belonging to the file(stat command). In case of a directory, the data in the data blocks will contain the mapping of the file names to its inode numbers, which is typically the info present in a directory. Let us consider a directory "xyz". The inode number of "xyz" is 113 $ ls -lid xyz 113 drwxr-xr-x 4 root root 1024 Jun 27 12:15 xyz/ A typical directory mapping structure of "xyz" will look like this: Inode 113 . 113 .. 13 bin 610723 temp 610789 As seen, the directory information contains the first 2 entries : one for the current directory(.), and one for the parent directory(..). Followed by these 2 will be an entry for each and every file present under the "xyz" directory. Note: The directory mapping information does not contain its own name though. 10. Where does the directory inode number gets mapped with the directory name? At the parent directory. As shown above, every directory maintains a table which contains the list of files and directories present under the directory. And hence in the parent directory of the current directory, the name of the current directory will be found just like how we can find the name of the sub-directory of "xyz" from the above table. Hence, Unix will read the inode number of the parent directory from its directory tree, and go to the directory mapping of the mapping directory, and compares the inode numbers one by one. One of them will match, and it can get the name of its directory from there. The mapping of the parent directory of "xyz" directory: Inode 13 . 13 .. 610623 xyz 113 home 610791 - See more at: http://www.theunixschool.com/2012/08/move-files-and-directories-inodes-part- 3.html#sthash.EusFp2kd.dpuf Method one Since a leading minus in filename introduces ambiguity in recognizing the filename, you just need to eliminate such ambiguity by prepending a pathname to the filename. For example, if you have a file named “-my.txt” in current directory, you can access it as follows. $ chmod 600 ./-my.txt $ rm ./-my.txt Method two The second method to deal with a leading hyphen character is to take advantage of a special argument “--” which is interpreted by getopt() as the “end of option.” Most standard Linux command line utilities use getopt() to process command line arguments. When getopt() encounters “--”, it stops option-scanning process. Therefore, just insert “--” in front of the filename to make it explicit that the hyphenated filename is not part of command line arguments. $ chmod -- 600 -my.txt $ rm -- -my.txt -k, --key=POS1[,POS2] start a key at POS1, end it at POS2 (origin 1) vi is one of the most commonly used editors in UNIX. When we open a file using vi, we do some settings depending on our needs say, to set line number, to set indentation, to set the tab space etc in the file. However, these settings or customizations last only till the file is open. Some of these settings any user would always like to retain on opening any file. These settings can be grouped in a file called .exrc file, and hence the settings become permanent. Whenever a file is opened using vi, vi looks for the .exrc file in the home directory of the user. If present, it reads the file and applies the settings in the file being opened. And hence any customization we would like to have in the file should be put in this. In fact, all the commands which we execute in the escape mode or the last line execution mode can be put in the .exrc file. Settings commonly maintained in the .exrc file are: 1. Set commands :- Set commands used in vi like set list, set number, etc. 2. Abbreviations:- Frequently used words can be abbreviated. For example,say, a user uses the word 'include' lot many times. The user can create an abbreviation 'inc' for the word include. 3. Mapping keys:- Some key combinations can be mapped or made into a hot-key combination. We saw in in one of our earlier articles, how to map function keys. A typical $HOME/.exrc file will look like as shown below: - See more at: http://www.theunixschool.com/2010/06/what-is-exrc-file- for.html#sthash.i9qEkl0u.dpuf et number set autoindent set nowrapscan ab inc include map Q :q! 1. The first three entries are part of the set commands, which includes setting line number, auto-indentation and search wrapping. With these settings, whenever a file is opened, automatically the line numbers will be set, and so is the indentation and search wrap. 2. The abbreviation 'ab inc include':- whenever you type 'inc' followed by a space in a file, it automatically gets converted to 'include'. This is a very helpful feature at times. 3. map Q :q! - This command maps the Q key with the quit operation. So, whenever the user wants to quit the file, instead of typing ':q!', the user can simply type 'Q' from the escape mode. The .exrc file should be present in the home directory itself and there is no limitation on the number of customizations being done in it. - See more at: http://www.theunixschool.com/2010/06/what-is-exrc-file- for.html#sthash.i9qEkl0u.dpuf Temporary Buffer Deleted or copied text goes into a temporary unnamed buffer. The contents of the temporary buffer may be retrieved by using the p or P commands. Lettered Buffers There are 26 lettered buffers (a-z). Contents of a lettered buffer are saved until you copy or delete more characters into it, or until you quit your current vi session.
Recommended publications
  • DC Console Using DC Console Application Design Software
    DC Console Using DC Console Application Design Software DC Console is easy-to-use, application design software developed specifically to work in conjunction with AML’s DC Suite. Create. Distribute. Collect. Every LDX10 handheld computer comes with DC Suite, which includes seven (7) pre-developed applications for common data collection tasks. Now LDX10 users can use DC Console to modify these applications, or create their own from scratch. AML 800.648.4452 Made in USA www.amltd.com Introduction This document briefly covers how to use DC Console and the features and settings. Be sure to read this document in its entirety before attempting to use AML’s DC Console with a DC Suite compatible device. What is the difference between an “App” and a “Suite”? “Apps” are single applications running on the device used to collect and store data. In most cases, multiple apps would be utilized to handle various operations. For example, the ‘Item_Quantity’ app is one of the most widely used apps and the most direct means to take a basic inventory count, it produces a data file showing what items are in stock, the relative quantities, and requires minimal input from the mobile worker(s). Other operations will require additional input, for example, if you also need to know the specific location for each item in inventory, the ‘Item_Lot_Quantity’ app would be a better fit. Apps can be used in a variety of ways and provide the LDX10 the flexibility to handle virtually any data collection operation. “Suite” files are simply collections of individual apps. Suite files allow you to easily manage and edit multiple apps from within a single ‘store-house’ file and provide an effortless means for device deployment.
    [Show full text]
  • The Ifplatform Package
    The ifplatform package Original code by Johannes Große Package by Will Robertson http://github.com/wspr/ifplatform v0.4a∗ 2017/10/13 1 Main features and usage This package provides the three following conditionals to test which operating system is being used to run TEX: \ifwindows \iflinux \ifmacosx \ifcygwin If you only wish to detect \ifwindows, then it does not matter how you load this package. Note then that use of (Linux or Mac OS X or Cygwin) can then be detected with \ifwindows\else. If you also wish to determine the difference between which Unix-variant you are using (i.e., also detect \iflinux, \ifmacosx, and \ifcygwin) then shell escape must be enabled. This is achieved by using the -shell-escape command line option when executing LATEX. If shell escape is not enabled, \iflinux, \ifmacosx, and \ifcygwin will all return false. A warning will be printed in the console output to remind you in this case. ∗Thanks to Ken Brown, Joseph Wright, Zebb Prime, and others for testing this package. 1 2 Auxiliary features \ifshellescape is provided as a conditional to test whether shell escape is active or not. (Note: new versions of pdfTEX allow you to query shell escape with \ifnum\pdfshellescape>0 , and the pdftexcmds package provides the wrapper \pdf@shellescape which works with X TE EX, pdfTEX, and LuaTEX.) Also, the \platformname command is defined to expand to a macro that represents the operating system. Default definitions are (respectively): \windowsname ! ‘Windows’ \notwindowsname ! ‘*NIX’ (when shell escape is disabled) \linuxname ! ‘Linux’ \macosxname ! ‘Mac OS X’ \cygwinname ! ‘Cygwin’ \unknownplatform ! whatever is returned by uname E.g., if \ifwindows is true then \platformname expands to \windowsname, which expands to ‘Windows’.
    [Show full text]
  • A First Course to Openfoam
    Basic Shell Scripting Slides from Wei Feinstein HPC User Services LSU HPC & LON [email protected] September 2018 Outline • Introduction to Linux Shell • Shell Scripting Basics • Variables/Special Characters • Arithmetic Operations • Arrays • Beyond Basic Shell Scripting – Flow Control – Functions • Advanced Text Processing Commands (grep, sed, awk) Basic Shell Scripting 2 Linux System Architecture Basic Shell Scripting 3 Linux Shell What is a Shell ▪ An application running on top of the kernel and provides a command line interface to the system ▪ Process user’s commands, gather input from user and execute programs ▪ Types of shell with varied features o sh o csh o ksh o bash o tcsh Basic Shell Scripting 4 Shell Comparison Software sh csh ksh bash tcsh Programming language y y y y y Shell variables y y y y y Command alias n y y y y Command history n y y y y Filename autocompletion n y* y* y y Command line editing n n y* y y Job control n y y y y *: not by default http://www.cis.rit.edu/class/simg211/unixintro/Shell.html Basic Shell Scripting 5 What can you do with a shell? ▪ Check the current shell ▪ echo $SHELL ▪ List available shells on the system ▪ cat /etc/shells ▪ Change to another shell ▪ csh ▪ Date ▪ date ▪ wget: get online files ▪ wget https://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.gz ▪ Compile and run applications ▪ gcc hello.c –o hello ▪ ./hello ▪ What we need to learn today? o Automation of an entire script of commands! o Use the shell script to run jobs – Write job scripts Basic Shell Scripting 6 Shell Scripting ▪ Script: a program written for a software environment to automate execution of tasks ▪ A series of shell commands put together in a file ▪ When the script is executed, those commands will be executed one line at a time automatically ▪ Shell script is interpreted, not compiled.
    [Show full text]
  • Linking + Libraries
    LinkingLinking ● Last stage in building a program PRE- COMPILATION ASSEMBLY LINKING PROCESSING ● Combining separate code into one executable ● Linking done by the Linker ● ld in Unix ● a.k.a. “link-editor” or “loader” ● Often transparent (gcc can do it all for you) 1 LinkingLinking involves...involves... ● Combining several object modules (the .o files corresponding to .c files) into one file ● Resolving external references to variables and functions ● Producing an executable file (if no errors) file1.c file1.o file2.c gcc file2.o Linker Executable fileN.c fileN.o Header files External references 2 LinkingLinking withwith ExternalExternal ReferencesReferences file1.c file2.c int count; #include <stdio.h> void display(void); Compiler extern int count; int main(void) void display(void) { file1.o file2.o { count = 10; with placeholders printf(“%d”,count); display(); } return 0; Linker } ● file1.o has placeholder for display() ● file2.o has placeholder for count ● object modules are relocatable ● addresses are relative offsets from top of file 3 LibrariesLibraries ● Definition: ● a file containing functions that can be referenced externally by a C program ● Purpose: ● easy access to functions used repeatedly ● promote code modularity and re-use ● reduce source and executable file size 4 LibrariesLibraries ● Static (Archive) ● libname.a on Unix; name.lib on DOS/Windows ● Only modules with referenced code linked when compiling ● unlike .o files ● Linker copies function from library into executable file ● Update to library requires recompiling program 5 LibrariesLibraries ● Dynamic (Shared Object or Dynamic Link Library) ● libname.so on Unix; name.dll on DOS/Windows ● Referenced code not copied into executable ● Loaded in memory at run time ● Smaller executable size ● Can update library without recompiling program ● Drawback: slightly slower program startup 6 LibrariesLibraries ● Linking a static library libpepsi.a /* crave source file */ … gcc ..
    [Show full text]
  • “Log” File in Stata
    Updated July 2018 Creating a “Log” File in Stata This set of notes describes how to create a log file within the computer program Stata. It assumes that you have set Stata up on your computer (see the “Getting Started with Stata” handout), and that you have read in the set of data that you want to analyze (see the “Reading in Stata Format (.dta) Data Files” handout). A log file records all your Stata commands and output in a given session, with the exception of graphs. It is usually wise to retain a copy of the work that you’ve done on a given project, to refer to while you are writing up your findings, or later on when you are revising a paper. A log file is a separate file that has either a “.log” or “.smcl” extension. Saving the log as a .smcl file (“Stata Markup and Control Language file”) keeps the formatting from the Results window. It is recommended to save the log as a .log file. Although saving it as a .log file removes the formatting and saves the output in plain text format, it can be opened in most text editing programs. A .smcl file can only be opened in Stata. To create a log file: You may create a log file by typing log using ”filepath & filename” in the Stata Command box. On a PC: If one wanted to save a log file (.log) for a set of analyses on hard disk C:, in the folder “LOGS”, one would type log using "C:\LOGS\analysis_log.log" On a Mac: If one wanted to save a log file (.log) for a set of analyses in user1’s folder on the hard drive, in the folder “logs”, one would type log using "/Users/user1/logs/analysis_log.log" If you would like to replace an existing log file with a newer version add “replace” after the file name (Note: PC file path) log using "C:\LOGS\analysis_log.log", replace Alternately, you can use the menu: click on File, then on Log, then on Begin.
    [Show full text]
  • 21Files2.Pdf
    Here is a portion of a Unix directory tree. The ovals represent files, the rectangles represent directories (which are really just special cases of files). A simple implementation of a directory consists of an array of pairs of component name and inode number, where the latter identifies the target file’s inode to the operating system (an inode is data structure maintained by the operating system that represents a file). Note that every directory contains two special entries, “.” and “..”. The former refers to the directory itself, the latter to the directory’s parent (in the case of the slide, the directory is the root directory and has no parent, thus its “..” entry is a special case that refers to the directory itself). While this implementation of a directory was used in early file systems for Unix, it suffers from a number of practical problems (for example, it doesn’t scale well for large directories). It provides a good model for the semantics of directory operations, but directory implementations on modern systems are more complicated than this (and are beyond the scope of this course). Here are two directory entries referring to the same file. This is done, via the shell, through the ln command which creates a (hard) link to its first argument, giving it the name specified by its second argument. The shell’s “ln” command is implemented using the link system call. Here are the (abbreviated) contents of both the root (/) and /etc directories, showing how /unix and /etc/image are the same file. Note that if the directory entry /unix is deleted (via the shell’s “rm” command), the file (represented by inode 117) continues to exist, since there is still a directory entry referring to it.
    [Show full text]
  • The AWK Programming Language
    The Programming ~" ·. Language PolyAWK- The Toolbox Language· Auru:o V. AHo BRIAN W.I<ERNIGHAN PETER J. WEINBERGER TheAWK4 Programming~ Language TheAWI(. Programming~ Language ALFRED V. AHo BRIAN w. KERNIGHAN PETER J. WEINBERGER AT& T Bell Laboratories Murray Hill, New Jersey A ADDISON-WESLEY•• PUBLISHING COMPANY Reading, Massachusetts • Menlo Park, California • New York Don Mills, Ontario • Wokingham, England • Amsterdam • Bonn Sydney • Singapore • Tokyo • Madrid • Bogota Santiago • San Juan This book is in the Addison-Wesley Series in Computer Science Michael A. Harrison Consulting Editor Library of Congress Cataloging-in-Publication Data Aho, Alfred V. The AWK programming language. Includes index. I. AWK (Computer program language) I. Kernighan, Brian W. II. Weinberger, Peter J. III. Title. QA76.73.A95A35 1988 005.13'3 87-17566 ISBN 0-201-07981-X This book was typeset in Times Roman and Courier by the authors, using an Autologic APS-5 phototypesetter and a DEC VAX 8550 running the 9th Edition of the UNIX~ operating system. -~- ATs.T Copyright c 1988 by Bell Telephone Laboratories, Incorporated. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopy­ ing, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Published simultaneously in Canada. UNIX is a registered trademark of AT&T. DEFGHIJ-AL-898 PREFACE Computer users spend a lot of time doing simple, mechanical data manipula­ tion - changing the format of data, checking its validity, finding items with some property, adding up numbers, printing reports, and the like.
    [Show full text]
  • Linux Shell Script to Find Kernel Version from Multiple Servers Linux Shell Script That Will Login to Server Via Ssh and Get Kernel Version Via Uname -R Command
    Linux Shell Script To Find Kernel Version From Multiple Servers Linux shell script that will login to server via ssh and get kernel version via uname -r command. List of all the servers are in server_list.txt file, script will take name by name and try to ssh with the root user and run uname -r command. Output will be written to variable and after into file with servername. This script helps system administrator who manage large linux servers , to take reports of what linux versions running. Here I have used uname -r but you can edit and use your own command as per your requirements. Source : http://linoxide.com/linux-shell-script/kernel-version-multiple/ Linux Shell Script #!/bin/bash #we user variable serverlist to keep there path to file with server names serverlist=’server_list.txt’ #we write in variable all server list servers=`cat $serverlist` #we use variable result to keep there path to file with result result=’result.txt’ #this print header to file with resilt using \t\t to add 2 tab symbols echo -e “Servername \t\t kernel version”> $result #this get each line of serverlist one by one and write to server variable for server in $servers do #this login to server by ssh and get uname -r kernel=`ssh root@${server} “uname -r”` #this write server name and kernel version separated by 2 tab to result file echo -e “$server \t\t $kernel” >> $result #end of for loop. done server_list.txt file # cat server_list.txt dev Linux Shell Script To Find Kernel Version From Multiple Servers 1 www.linoxide.com web1 svn Shell Script Output ./kernel_version.sh centos_node1@bobbin:~/Documents/Work/Bobbin$ cat result.txt Servername kernel version dev 3.3.8-gentoo web1 3.2.12-gentoo svn 3.2.12-gentoo Linux Shell Script To Find Kernel Version From Multiple Servers 2 www.linoxide.com.
    [Show full text]
  • Compiling a Language
    Universidade Federal de Minas Gerais – Department of Computer Science – Programming Languages Laboratory COMPILING A LANGUAGE DCC 888 Dealing with Programming Languages • LLVM gives developers many tools to interpret or compile a language: – The intermediate representaon – Lots of analyses and opDmiEaons Fhen is it worth designing a new • Fe can work on a language that already languageM exists, e.g., C, CKKI Lava, etc • Fe can design our own language. We need a front Machine independent Machine dependent end to convert optimizations, such as optimizations, such programs in the constant propagation as register allocation source language 2344555 to LLVM IR *+,-), 1#% ((0 !"#$%&'() '()./0 '()./0 '().- The Simple Calculator • To illustrate this capacity of LLAM, le2Ns design a very simple programming language: – A program is a funcDon applicaon – A funcDon contains only one argument x – Only the integer type exists – The funcDon body contains only addiDons, mulDplicaons, references to x, and integer constants in polish notaon: 1) Can you understand why we got each of these valuesM SR How is the grammar of our languageM The Architecture of Our Compiler !"#"$ %&$'"$ 2$34"$ (#)$ !!*05136' 1) Can you guess the meaning of the *&$(#)$ 0,1(#)$ diUerent arrowsM SR Can you guess the +,-(#)$ .//(#)$ role of each classM 3) Fhat would be a good execuDon mode for our systemM The Execuon Engine Our execuDon engine parses the expression, $> ./driver 4! converts it to a funcDon wriSen in LLAM IR, LIT * x x! Result: 16! compiles this funcDon, and runs it with the argument passed to the program in command $> ./driver 4! line. + x * x 2! Result: 12! Le2Ns start with our lexer.
    [Show full text]
  • The Cool Reference Manual∗
    The Cool Reference Manual∗ Contents 1 Introduction 3 2 Getting Started 3 3 Classes 4 3.1 Features . 4 3.2 Inheritance . 5 4 Types 6 4.1 SELF TYPE ........................................... 6 4.2 Type Checking . 7 5 Attributes 8 5.1 Void................................................ 8 6 Methods 8 7 Expressions 9 7.1 Constants . 9 7.2 Identifiers . 9 7.3 Assignment . 9 7.4 Dispatch . 10 7.5 Conditionals . 10 7.6 Loops . 11 7.7 Blocks . 11 7.8 Let . 11 7.9 Case . 12 7.10 New . 12 7.11 Isvoid . 12 7.12 Arithmetic and Comparison Operations . 13 ∗Copyright c 1995-2000 by Alex Aiken. All rights reserved. 1 8 Basic Classes 13 8.1 Object . 13 8.2 IO ................................................. 13 8.3 Int................................................. 14 8.4 String . 14 8.5 Bool . 14 9 Main Class 14 10 Lexical Structure 14 10.1 Integers, Identifiers, and Special Notation . 15 10.2 Strings . 15 10.3 Comments . 15 10.4 Keywords . 15 10.5 White Space . 15 11 Cool Syntax 17 11.1 Precedence . 17 12 Type Rules 17 12.1 Type Environments . 17 12.2 Type Checking Rules . 18 13 Operational Semantics 22 13.1 Environment and the Store . 22 13.2 Syntax for Cool Objects . 24 13.3 Class definitions . 24 13.4 Operational Rules . 25 14 Acknowledgements 30 2 1 Introduction This manual describes the programming language Cool: the Classroom Object-Oriented Language. Cool is a small language that can be implemented with reasonable effort in a one semester course. Still, Cool retains many of the features of modern programming languages including objects, static typing, and automatic memory management.
    [Show full text]
  • Mata, the Missing Manual
    Mata, the missing manual Mata, the missing manual William Gould President and Head of Development StataCorp LP July 2011, Chicago W. Gould (StataCorp) Mata, the missing manual 14–15 July 2011 1 / 94 Mata, the missing manual Introduction Mata, the missing manual Before we begin, . Apologies to Pogue Media and O’Reilly Media, creators of the fine Missing Manual series, “the book that should have been in the box”. (Unrelated to Mata, their web site is http://missingmanuals.com) W. Gould (StataCorp) Mata, the missing manual 14–15 July 2011 2 / 94 Mata, the missing manual Introduction Introduction Mata is Stata’s matrix programming language. StataCorp provides detailed documentation but has failed to provide any guidance as to when and how to use the language. This talk addresses StataCorp’s omission. I will discuss How to include Mata code in Stata ado-files. When to include Mata code (and when not to). Mata’s broad concepts. This talk is the prelude to the Mata Reference Manual. This talk will be advanced. W. Gould (StataCorp) Mata, the missing manual 14–15 July 2011 3 / 94 Mata, the missing manual Introduction Mata Matters (?) Cute title of Stata Journal column, title fashioned by Nicholas J. Cox; content by me. Why does Mata matter? Because it is an important development language for Stata. StataCorp uses it. sem, mi, xtmixed, etc. were developed using it. We at StataCorp can better and more quickly write code using it. You can, too. W. Gould (StataCorp) Mata, the missing manual 14–15 July 2011 4 / 94 Mata, the missing manual Introduction Problem with Mata Reference Manual The problem with the Mata Reference manual is that ..
    [Show full text]
  • BASH Programming − Introduction HOW−TO BASH Programming − Introduction HOW−TO
    BASH Programming − Introduction HOW−TO BASH Programming − Introduction HOW−TO Table of Contents BASH Programming − Introduction HOW−TO.............................................................................................1 by Mike G mikkey at dynamo.com.ar.....................................................................................................1 1.Introduction...........................................................................................................................................1 2.Very simple Scripts...............................................................................................................................1 3.All about redirection.............................................................................................................................1 4.Pipes......................................................................................................................................................1 5.Variables...............................................................................................................................................2 6.Conditionals..........................................................................................................................................2 7.Loops for, while and until.....................................................................................................................2 8.Functions...............................................................................................................................................2
    [Show full text]