Miscellaneous Q & A


Back to Unix help page

ajw - Last updated 6/24/94


Subject: mounting home directories
Date: Mon, 8 Nov 93 18:54:51 EST
From: Mike Little (little@ssc.sas.upenn.edu)

 > I showed a user how to mount his Unix home directory as a DOS
directory from a gdal network PC.  Say, for user little, you enter:

   idmnt unix ssdc /mcneil/home/userid f: user little

 The word "unix" is arbitrary; it can be anything.
 You are then prompted for your Unix password.
 You can now access drive F: as a DOS drive, but you are storing your
files on SSDC.
 *** BE SURE TO UNMOUNT YOUR HOME DIRECTORY WHEN YOU'RE DONE!!! ***
   d:			change to another drive
   idumnt f:		unmount the filesystem
 Logging out does NOT unmount the filesystem!!!

Subject: gauss manuals
Date: Mon, 1 Nov 93 19:07:16 EST
From: Mike Little (little@ssc.sas.upenn.edu)

 Peter C. (econ) asked if he could order Gauss manuals. I called
Aptech Systems and he asked.  They said he had to order them through the
university.

Subject: do_search
Date: Tue, 26 Oct 93 21:56:27 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
 Pat told me how to use wildcards in a do_search study title lookup:

The percent sign "%" is the wildcard char, so you can search
for "CENSUS OF POPULATION AND HOUSING, 1950: MICRODATA..." by entering

CENSUS%1950

at the proper field.  
Subject: do_search file information
Date: Tue, 30 Nov 93 16:00:05 EST
From: James A. Sledd (jsledd@ssc.sas.upenn.edu)

After you have identified a dataset, control U will give the location of
a file under unix if it is available.


Subject: stata manuals
Date: Tue, 26 Oct 93 21:56:27 EDT
From: Mike Little (little@ssc.sas.upenn.edu)

USERS CAN CALL 1-800-STATA-PC TO ORDER THEIR OWN STATA MANUALS!

Subject: executing .profile
Date: Tue, 26 Oct 93 21:56:27 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
I tried executing .profile file from the home directory by entering
	. .profile
but it said "ksh: .profile: not found." 
Andrew suggested entering 
	./.profile    or
	 ksh .profile
 - both of which worked.

Subject: creating a column of numbers
Date: Tue, 19 Oct 93 18:48:16 EDT
From: Mike Little (little@ssc.sas.upenn.edu)

Adel (econ) wanted to use a column of numbers, say 1-100 in a
do-file, and wanted an easy way to enter the numbers in Uni-xedit. He
could write an xedit macro, which I didn't want to do. An easier way is
to generate the list in Stata and save the output to a log file:
   log using abc
   set obs 100
   generate num = _n
   list num

Then edit file abc.

Subject: Job Control
Date: Tue, 19 Oct 93 18:48:16 EDT
From: Mike Little (little@ssc.sas.upenn.edu)

To turn a foreground process into a background one, Tim Cheney
suggested doing a variation of this:
   Ctrl-z      # to suspend the process
   bg          # to restart the suspended process in the background
 This is described in the O'Reiley book, "Understanding the Unix
Operating System", p. 74.

Subject: Domain Names appended when using TN
Date: Thu, 14 Oct 93 12:48:46 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
User wanting to use mail.sas on an X-terminal was entering mail.sas
as the hostname w/ no success.  I told him that our system (?) appends
".sas.upenn.edu" automatically to non-fully-qualified domain names, so
he was trying to connect to mail.sas.sas.upenn.edu.  We entered "mail"
as the hostname and he got in.

Subject: "smart recall" for set -o emacs
Date: Tue, 12 Oct 93 20:07:25 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
   The "set -o emacs" function allows you to do an emacs-style search
for previously entered commands.  Say you had entered some really long
Unix command about 30 commands ago, and you want to enter it again. One
way to redisplay the command would be to enter Ctrl-p 30 times, but this
can be tedious. Just do a reverse search, like you would in emacs! 
First press Ctrl-R. "^R" will appear at the prompt. Follow this
immeadiately with some unique characters from the command string, then
press enter. The first command containing this string will appear at the
prompt!

   (I tried this out after finding that Matlab has a similar "smart
recall" function, except it uses the up-arrow to go backwards.)

Subject: Logging Telnet Session To a File
Date: Tue, 5 Oct 93 18:24:20 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
Telnet command to trap the output from commands: "o" for "write
received data to output file".  Do F10-o, and Telnet prompts you for the
name of an output file. Enter a DOS filename, and your Unix screen
output is copied there (more or less). Do F10-o again to close the
output file.

Subject: Changing rows in xedit screen; solved (fwd)
Date: Wed, 29 Sep 93 10:14:10 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
Joey Barber (econ) wants to set his UniXedit screen size to 27 rather
than the default of 24 using an ascii terminal. I checked the uni-xedit
manual, but found no physical screen-related SET statements.  I think
this might really be a Unix variable question.  

Joey Barber writes
- 
- Thanks for your help.  The procedure is to export LINES=27.  Then
- xedit and elm use the new screen size.  To set the width of the screen,
- you would set COLUMNS=###.  This is how these programs know what to
- display when you resize an aixterm.
- 
- JB

Subject: Converting DOS files with TABS for Unix-SAS use
Date: Thu, 16 Sep 93 13:47:35 EDT
From: Mike Little (little@ssc.sas.upenn.edu)
Margaret Lubega (dem): We finally succeeded in automatically
converting one of her files from what we think was a DOS format (with
a Ctrl-M char at the end of each line), with tabs at various places in
each line, into a file that is easy to read by SAS -- i.e., no ^M chars,
and tabs converted to spaces. Here's the shell script file we wrote:

# Unzip the file line by line and pipe the output to the next command.
# dos2aix removes the ^M characters from the end of each line.
# untab converts tabs into spaces.
# Finally, send the line to an output file.

unzip -p kampa.pop.zip | dos2aix | untab > kampa.pop


Subject: Filenames with spaces; FTP and EDIT
Date: Wed, 10 Nov 93 16:04:20 EST
From: Ed Horn (ethorn@ssc.sas.upenn.edu)
)Lopez/econ:Had problem ftping some files with names "word1 word2".  Ftp
was thinking that this was 2 files instead of 1.  Alex V. suggested mget
* which 'by-passed' the problem.  

Lopez then wanted to edit them.  Both xe and emacs could not deal with
the 2 separate word file name.  Pat suggested ; xe "word1 word2" which
worked.

Subject: real arrow keys for Unix command line
Date: Thu, 21 Oct 93 10:00:10 EDT
From: Mike Little (little@ssc.sas.upenn.edu)

I found, in AIX Frequently Asked Questions 1.401, a way to get arrow
keys to work on Unix command lines.  I tried it and it works.  Can it be
set up to automatically execute w/o people having to change their
.profile file?

 - Mike

p.s. The "^P" et al. are real control sequences. I did them in gemacs.


# Set up *real* arrow keys for command line editing.
alias __A=
alias __B=
alias __C=
alias __D=
alias __H=
set -o emacs  # Allow emacs line editing keys on command line.