Sponsored Content
Full Discussion: set prompt = pwd
Top Forums UNIX for Dummies Questions & Answers set prompt = pwd Post 302476189 by cero on Wednesday 1st of December 2010 04:36:10 AM
Old 12-01-2010
That is c shell syntax, so the variable prompt is ok - Scrutinizers other explanation is correct.
Lets hope you are never forced to use that awful shell after the review...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

kill, set prompt

ok, there is a way to nicely kill a suspended job and to terminate another without using the mass -KILL command. also, how can I set my prompt temporarly without using the .bash_profile that uses the PS1. Thanks:) (1 Reply)
Discussion started by: bitwize
1 Replies

2. UNIX for Dummies Questions & Answers

set prompt in sh

hi, this < setprompt 'set prompt="# "' > is set in C shell. what is the equivalent in sh? thanks (14 Replies)
Discussion started by: yls177
14 Replies

3. UNIX for Advanced & Expert Users

"Set prompt"

Hi Currently amending my bash profiles, there is a command that makes my session jump into another location. I just wonder if I could pre-define my prompt to begin with "cd " from this location (in order to navigate further into sub-directories). Is there any way of doing that? An important thing... (0 Replies)
Discussion started by: Indalecio
0 Replies

4. UNIX for Dummies Questions & Answers

Set prompt, problems and tricks

I'm using a csh shell (or, that'd be my guess from the .cshrc file I see) and I'm looking to change my prompt. There are about 10 other threads, I know, but this question is a little more specific. I want to know, is there a way to list the current directory from a certain level or directory... (6 Replies)
Discussion started by: HybridLogic
6 Replies

5. UNIX for Advanced & Expert Users

echo ${PWD#${PWD%/*/*}/}

Can anyone explain this in detail ... echo ${PWD#${PWD%/*/*}/} Thanks in Advance (1 Reply)
Discussion started by: sakthi.abdullah
1 Replies

6. Shell Programming and Scripting

set timeout for ssh prompt

Hi all, I want to set a timeout say 10 sec to shh prompt i.e. if no password is enetered for 10 sec prompt should again come to shell. How can this be achieved ?? I am using Linux RHEL 5 and Solaris 10. Pls help. Thanks in adv. VIKAS (3 Replies)
Discussion started by: vikas027
3 Replies

7. Shell Programming and Scripting

CWD in prompt only showing the directory when set

Hi Gurus, I am working in tcsh and i set the prompt with this. set prompt = "$cwd>" But I see teh prompt only gets reflected with the directory where I set the prompt. After i cd to another directory it still shows the old directory. Please advise (1 Reply)
Discussion started by: kinny
1 Replies

8. Shell Programming and Scripting

tcsh/csh: set prompt in production to color red

Hi folks This is our prompt at the moment oracle@pinkipinki:/opt/oracle> grep 'set prompt' .cshrc set prompt = "$user@`uname -n`:$cwd> " We wish to have in production the same prompt, but red. Howto do that? I tried a lot a internet manuals, but it doesn't work. (1 Reply)
Discussion started by: slashdotweenie
1 Replies

9. AIX

sync samba pwd with aix5.3 pwd

currently, my samba login works just fine. i want my clients to use aix5.3 account to login to samba so they don't have to change samba pwd and aix pwd. i googled, and vi /usr/lib/smb.conf per some of knowledge base, but i could not get to work. aix5.3 and samba 3.0.24.0 thanks in advace..... (2 Replies)
Discussion started by: tjmannonline
2 Replies

10. HP-UX

Unable to Set Prompt to current working DIR

HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively. So how do i set the PS1 variable to display my current working Directory as my prompt? I also tried PS1=$PWD, But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies
LUA(1)							      General Commands Manual							    LUA(1)

NAME
lua - Lua interpreter SYNOPSIS
lua [ options ] [ script [ args ] ] DESCRIPTION
lua is the stand-alone Lua interpreter. It loads and executes Lua programs, either in textual source form or in precompiled binary form. (Precompiled binaries are output by luac, the Lua compiler.) lua can be used as a batch interpreter and also interactively. The given options (see below) are executed and then the Lua program in file script is loaded and executed. The given args are available to script as strings in a global table named arg. If these arguments contain spaces or other characters special to the shell, then they should be quoted (but note that the quotes will be removed by the shell). The arguments in arg start at 0, which contains the string 'script'. The index of the last argument is stored in arg.n. The arguments given in the command line before script, including the name of the interpreter, are available in negative indices in arg. At the very start, before even handling the command line, lua executes the contents of the environment variable LUA_INIT, if it is defined. If the value of LUA_INIT is of the form '@filename', then filename is executed. Otherwise, the string is assumed to be a Lua statement and is executed. Options start with '-' and are described below. You can use '--' to signal the end of options. If no arguments are given, then -v -i is assumed when the standard input is a terminal; otherwise, - is assumed. In interactive mode, lua prompts the user, reads lines from the standard input, and executes them as they are read. If a line does not contain a complete statement, then a secondary prompt is displayed and lines are read until a complete statement is formed or a syntax error is found. So, one way to interrupt the reading of an incomplete statement is to force a syntax error: adding a ';' in the middle of a statement is a sure way of forcing a syntax error (except inside multiline strings and comments; these must be closed explicitly). If a line starts with '=', then lua displays the values of all the expressions in the remainder of the line. The expressions must be separated by commas. The primary prompt is the value of the global variable _PROMPT, if this value is a string; otherwise, the default prompt is used. Similarly, the secondary prompt is the value of the global variable _PROMPT2. So, to change the prompts, set the corresponding variable to a string of your choice. You can do that after calling the interpreter or on the command line (but in this case you have to be careful with quotes if the prompt string contains a space; otherwise you may confuse the shell.) The default prompts are "> " and ">> ". OPTIONS
- load and execute the standard input as a file, that is, not interactively, even when the standard input is a terminal. -e stat execute statement stat. You need to quote stat if it contains spaces, quotes, or other characters special to the shell. -i enter interactive mode after script is executed. -l name call require('name') before executing script. Typically used to load libraries. -v show version information. SEE ALSO
luac(1) http://www.lua.org/ DIAGNOSTICS
Error messages should be self explanatory. AUTHORS
R. Ierusalimschy, L. H. de Figueiredo, and W. Celes $Date: 2006/01/06 16:03:34 $ LUA(1)
All times are GMT -4. The time now is 05:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy