Sponsored Content
Full Discussion: Quick Question
Top Forums UNIX for Dummies Questions & Answers Quick Question Post 1270 by 98_1LE on Tuesday 20th of February 2001 03:20:47 PM
Old 02-20-2001
Another shell, bash (often installed in /usr/local/bin/bash), allows you to scroll through the command history with the up/down arrow keys. Bash is typically installed in Linux or Solaris 8 machines but can be added to most UNIX flavors. To see if bash is on you system, execute;
which bash

or

ls /usr/local/bin/bash
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

A very quick question

Just a super quick question: how do you put a link in your php code. I want to make a link to something in /tmp directory. i.e. how do you put a href into php, I think it's done a bit differently. thanks john (1 Reply)
Discussion started by: jmg5
1 Replies

2. UNIX for Dummies Questions & Answers

Quick Question

Hello There! I am trying to write this SIMPLE script in Bourne Shell but I keep on getting syntax errors. Can you see what I am doing wrong? I've done this before but I don't see the difference. I am simply trying to take the day of the week from our system and when the teachers sign on I want... (7 Replies)
Discussion started by: catbad
7 Replies

3. UNIX for Dummies Questions & Answers

Another quick question

Hi guys sed -e "s/$<//g" the $< can allow me to assign an input value to the variable right? do the double quotes check the previous context? (1 Reply)
Discussion started by: hamoudzz
1 Replies

4. Shell Programming and Scripting

quick question

does anyone know what $? means? i echoed it on my box (running AIX Korn shell) and got 127 (2 Replies)
Discussion started by: penfold
2 Replies

5. UNIX for Dummies Questions & Answers

Quick Question

Hi, I am new to UNIX, and am learning from this tutorial : http://www.ee.surrey.ac.uk/Teaching/Unix/index.html It keeps telling me to files downloaded from the internet (like .txt files) to the directory, and I dont know how to. How do I add .txt files to my directory? Thanks. (6 Replies)
Discussion started by: IAMTHEEVILBEAN
6 Replies

6. UNIX for Dummies Questions & Answers

Quick question

Hi, Is there a simple way, using ksh, to find the byte position in a file that a stated character appears? Many thanks Helen (2 Replies)
Discussion started by: Bab00shka
2 Replies

7. UNIX for Dummies Questions & Answers

quick question

from command prompt I did grep two words on a same line for eg: grep abc | grep xyz and I got tht particular line, but I want to know when I vi that file how to directly search for that particular line? I appreciate if any one can provide answer, thanks in advance (2 Replies)
Discussion started by: pkolishetty
2 Replies

8. UNIX for Dummies Questions & Answers

Quick question

Hello all, Quick question from a fairly new to Unix developer. if then completedLogFile=$logfile.$(date +%Y%m%d-%H:%M:%S) mv $logfile $completedLogFile fi I understand that this portion of code is simply copying a tmp logfile to a completed logfile when a condition is true. The... (2 Replies)
Discussion started by: JohnnyBoy
2 Replies

9. UNIX for Dummies Questions & Answers

Quick question.

I'd like to list all userid's on the system that have a .bashrc file in their home directory with a command like "cat /etc/passwd | grep -f", however I'm not quite familiar with using grep. Any suggestions? (2 Replies)
Discussion started by: raidkridley
2 Replies

10. Shell Programming and Scripting

Quick question

When I have a file like this: 0084AF aj-123-a NAME Ajay NAME Kumar Engineer 015ED6 ck-345-c 020B25 ef-456-e 027458 pq-890-p NAME Peter NAME Salob Doctor 0318F0 xy-123-x NAME Xavier Arul NAME Yesu Supervisor 0344CA de-456-d where - The first NAME is followed by... (6 Replies)
Discussion started by: ajay41aj
6 Replies
hash(1) 							   User Commands							   hash(1)

NAME
hash, rehash, unhash, hashstat - evaluate the internal hash table of the contents of directories SYNOPSIS
/usr/bin/hash [utility] /usr/bin/hash [-r] sh hash [-r] [name]... csh rehash unhash hashstat ksh hash [name]... hash [-r] DESCRIPTION
/usr/bin/hash The /usr/bin/hash utility affects the way the current shell environment remembers the locations of utilities found. Depending on the argu- ments specified, it adds utility locations to its list of remembered locations or it purges the contents of the list. When no arguments are specified, it reports on the contents of the list. The -r option causes the shell to forget all remembered locations. Utilities provided as built-ins to the shell are not reported by hash. sh For each name, the location in the search path of the command specified by name is determined and remembered by the shell. The -r option to the hash built-in causes the shell to forget all remembered locations. If no arguments are given, hash provides information about remem- bered commands. The Hits column of output is the number of times a command has been invoked by the shell process. The Cost column of output is a measure of the work required to locate a command in the search path. If a command is found in a "relative" directory in the search path, after changing to that directory, the stored location of that command is recalculated. Commands for which this will be done are indi- cated by an asterisk (*) adjacent to the Hits information. Cost will be incremented when the recalculation is done. csh rehash recomputes the internal hash table of the contents of directories listed in the path environmental variable to account for new com- mands added. unhash disables the internal hash table. hashstat prints a statistics line indicating how effective the internal hash table has been at locating commands (and avoiding execs). An exec is attempted for each component of the path where the hash function indicates a possible hit and in each component that does not begin with a '/'. ksh For each name, the location in the search path of the command specified by name is determined and remembered by the shell. The -r option to the hash built-in causes the shell to forget all remembered locations. If no arguments are given, hash provides information about remem- bered commands. OPERANDS
The following operand is supported by hash: utility The name of a utility to be searched for and added to the list of remembered locations. OUTPUT
The standard output of hash is used when no arguments are specified. Its format is unspecified, but includes the pathname of each utility in the list of remembered locations for the current shell environment. This list consists of those utilities named in previous hash invoca- tions that have been invoked, and may contain those invoked and found through the normal command search process. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of hash: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. PATH Determine the location of utility. EXIT STATUS
The following exit values are returned by hash: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), ksh(1), sh(1), attributes(5), environ(5), standards(5) SunOS 5.11 17 Jul 2002 hash(1)
All times are GMT -4. The time now is 11:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy