Sponsored Content
Top Forums Shell Programming and Scripting Encrypt password but use * when typing password Post 302535320 by Scott on Thursday 30th of June 2011 11:45:34 AM
Old 06-30-2011
I've used \c in the past on AIX.

From man echo on AIX:

Code:
       \c
            Suppresses the new-line character that otherwise follows the final argument in the output. All characters following the \c sequence are ignored.

(of course now, I'd use printf!)
 

10 More Discussions You Might Find Interesting

1. Programming

hide password typing

I am doing a project in C program which requires to type in password in Unix terminal. Does anybody know how to shade or not output any words typed by user in the terminal? I use the function scan() to read typing from user. Thanks in advance. (2 Replies)
Discussion started by: ivancheung
2 Replies

2. Shell Programming and Scripting

encrypt and decrypt password

how do i encrypt and decrypt a password (2 Replies)
Discussion started by: sanwish
2 Replies

3. UNIX and Linux Applications

How to encrypt oracle password table ?

Hi Oracle & Unix expert, Could you tell me how to encrypt oracle table ? Thanks. (1 Reply)
Discussion started by: olaris
1 Replies

4. Shell Programming and Scripting

cronjob on a remote ssh without typing password

Hi there, How can I send a script to a remote ssh client. 1) I cannot connect through ftp 2) I just need to read a file on a remote server. Here is what I do: ~$ ssh santiago@myserver.com santiago@myserver.com's password: santiago@myserver:~$ cat logfile hello world bonjour le monde hola... (1 Reply)
Discussion started by: chebarbudo
1 Replies

5. Shell Programming and Scripting

Encrypt and save password

Hello all, I need to encrypt and save a password in a file and later decrypt to determine the original password string. Please suggest how can I use the linux commands or other approach to accomplish this. Thanks for your help. (1 Reply)
Discussion started by: cheerful
1 Replies

6. Shell Programming and Scripting

How to Encrypt password

Hello, I have a paramter file, In which I store all the user-ids and passwords for the project. So if a user just invokes the paramter file he has access to all the variables, which i have exported in the parmatere file. Now if a user echo's the variable which stores the databse password.... (1 Reply)
Discussion started by: DSDexter
1 Replies

7. AIX

SSH session closes after typing correct password

hi guys need some help. when ever i'm login ssh to aix server session always closed. when trying t0 type wrong password the session still continues, but we tried the correct password it automatically ends. what could be the problem to this please see .profile details ... (6 Replies)
Discussion started by: bocha
6 Replies

8. Shell Programming and Scripting

Encrypt DB password in Script

Hi, I have a SQL which i want to run through a shell script. query_result=`/home/oracle/product/11.2.0/bin/sqlplus -S uname/pwd@DBNAME <<! set heading off feedback off trimspool on set pagesize 0 set linesize 9999 spool $PARAM_PATH/param_name.txt; Select sysdate from dual; spool off;... (6 Replies)
Discussion started by: chetan.c
6 Replies

9. Shell Programming and Scripting

Encrypt Plaintext Password?

How do I encrypt a plaintext password that I need hardcoded in a bash script? (3 Replies)
Discussion started by: wyclef
3 Replies

10. UNIX for Beginners Questions & Answers

Encrypt and Decrypt a File with Password

Hello, I have few files on unix which are payroll related and I need them to encrypt with password so others wouldn't see the data. I use ETL tool and would like to know the unix command that does encryption/decryption to use in the ETL. Thank you, Sri (3 Replies)
Discussion started by: eskay
3 Replies
echo(1) 						      General Commands Manual							   echo(1)

NAME
echo - Writes its arguments to standard output SYNOPSIS
echo [-n] [string...] [Tru64 UNIX] The -n option is valid only if the environment variable CMD_ENV is set to bsd. Note The C shell has a built-in version of the echo command. If you are using the C shell, and want to guarantee that you are using the command described here, you must specify the full path /usr/bin/echo. See the csh(1) reference page for a description of the built-in command. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: echo: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
[Tru64 UNIX] No newline is added to the output. The -n option is valid only if the environment variable CMD_ENV is set to bsd. Otherwise any -n operand is treated as a string rather than as a option. See the printf(1) reference page for use in portable applications. OPERANDS
The string to be displayed on standard output. The echo command recognizes the following special characters in the string: Displays an alert character. Displays a backspace character. Suppresses the newline character. All characters following c in the arguments are ignored. Displays a formfeed character. Displays a newline character. Displays a carriage-return character. Displays a tab character. Displays a vertical tab character. Displays a backslash character. Displays an 8-bit character whose value is the 1-, 2- or 3-digit octal number, number. The first digit of number must be a 0 (zero). DESCRIPTION
The echo command writes the specified string to standard output, followed by a newline character. The arguments are separated by spaces. Use the echo command to produce diagnostic messages in command files and to send data into a pipe. If there are no arguments, the echo command outputs a newline character. [Tru64 UNIX] The echo command described here is the program /usr/bin/echo. Both csh and sh shells contain built-in echo subcommands, which do not necessarily work in the same way as the /usr/bin/echo command. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. EXAMPLES
To write a message to standard output, enter: echo Please insert diskette . . . To display a message containing special characters as listed in DESCRIPTION, enclose the message in quotes, as follows: echo " I'm at lunch. I'll be back at 1 p.m." This skips three lines and displays the message: I'm at lunch. I'll be back at 1 p.m. Note You must enclose the message in quotation marks if it contains escape sequences such as . Otherwise, the shell treats the back- slash () as an escape character. The previous command example, entered without the quotes, results in the following output: nnnI'm at lunch.nI'll be back at 1 p.m. To use echo with pattern-matching characters, enter: echo The back-up files are: *.bak This displays the message The back-up files are: and then displays the file names in the current directory ending with To add a sin- gle line of text to a file, enter: echo Remember to set the shell search path to $PATH. >>notes This adds the message to the end of the file notes after the shell substitutes the value of the PATH shell variable. To write a message to the standard error output (sh only), enter: echo Error: file already exists. >&2 Use this in shell procedures to write error messages. If the >&2 is omitted, then the message is written to the standard output. ENVIRONMENT VARIABLES
The following environment variables affect the execution of echo: [Tru64 UNIX] This variable must set to bsd for the -n option to be valid. Otherwise any -n operand is treated as a string member. Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: csh(1), ksh(1), printf(1), Bourne shell sh(1b), POSIX shell sh(1p) Environment: environ(5) Standards: standards(5) echo(1)
All times are GMT -4. The time now is 10:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy