Trying to use the read command. How do you add a 2nd option? In this example I'd like to offer two options, pre and post. If you answer pre, you get one output but if you answer post, you get another output.
'Morning
vmstat 1 1|sed 1,2d|awk '{printf("%s\n",$1)}'|read var
echo $var
This syntax run on AIX (ksh) but not on linux (bash).
I think that problem is the read command, because the following syntax is ok :
vmstat 1 1|sed 1,2d|awk '{printf("%s\n",$1)}'
Could someone help me!
regards... (16 Replies)
I have file which is space filled likE below
Note: here spaces are replaced by |.
When I use read command to read this file all the spaces are truncated only the default space is not removed. The output is
Note: here spaces are replaced by |.
Can this default truncation be override? (4 Replies)
hi all
iam not able use read command in the while loop in the following program
while read line
do
echo $line
echo "enter name"
read name
echo "your have entered $name"
done < work.txt
THE READ COMMAND INSIDE THE WHILE LOOP IS NOT WORKING, IS ANY OTHER WAY TO SOLVE THIS... (7 Replies)
Is there a way to use the READ command and force the user to enter a non-zero length string? If the user enters a zero length string the user input is rejected.
code:
print "what is the answer: \n"
read answer (2 Replies)
Hi everyone,
I have problem while writing a shell script for linux (Red Hat).
First I need to create a read command. I tried to google this but so far I can't sort this out. I hope you will be able to help me.
I have to read a file like this :
GESTION_DATA_SET_variable1_variable2
... (2 Replies)
Hey, guys!
Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek:
So, I wanted to use a command statement similar to the following.
This is kinda taken... (2 Replies)
Hello guys,
I am trying to a script that reads from key board and use the entered value in the next step.
Example: enter folder name
read $folder (i will give work)
cd /main/$folder/
pwd
it should print /main/work
---------- Post updated at 03:31 PM ----------... (1 Reply)
Hi,
I am facing issues with the below:
I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,).
Now i want to read this command from file and execute it.
So my code below is :
Contents in the lookup.lkp file is :
c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Is there a way to make the input of the read command (or some similar command that I'm unaware of) not visible, or with an astrix??
An example:
#!/bin/bash
# Example
echo; echo "Who are you??"; read name
if ;
then echo "Welcome, the terminal is yours."; exit
else "Stranger... (2 Replies)
Discussion started by: Huitzilopochtli
2 Replies
LEARN ABOUT V7
engine
ENGINE(1SSL) OpenSSL ENGINE(1SSL)NAME
openssl-engine, engine - load and query engines
SYNOPSIS
openssl engine [ engine... ] [-v] [-vv] [-vvv] [-vvv] [-vvv] [-c] [-t] [-tt] [-pre command] [-post command] [ engine... ]
DESCRIPTION
The engine command is used to query the status and capabilities of the specified engine's. Engines may be specified before and after all
other command-line flags. Only those specified are queried.
OPTIONS -v -vv -vvv -vvvv
Provides information about each specified engine. The first flag lists all the possible run-time control commands; the second adds a
description of each command; the third adds the input flags, and the final option adds the internal input flags.
-c Lists the capabilities of each engine.
-t Tests if each specified engine is available, and displays the answer.
-tt Displays an error trace for any unavailable engine.
-pre command
-post command
Command-line configuration of engines. The -pre command is given to the engine before it is loaded and the -post command is given
after the engine is loaded. The command is of the form cmd:val where cmd is the command, and val is the value for the command. See
the example below.
EXAMPLE
To list all the commands available to a dynamic engine:
$ openssl engine -t -tt -vvvv dynamic
(dynamic) Dynamic engine loading support
[ unavailable ]
SO_PATH: Specifies the path to the new ENGINE shared library
(input flags): STRING
NO_VCHECK: Specifies to continue even if version checking fails (boolean)
(input flags): NUMERIC
ID: Specifies an ENGINE id name for loading
(input flags): STRING
LIST_ADD: Whether to add a loaded ENGINE to the internal list (0=no,1=yes,2=mandatory)
(input flags): NUMERIC
DIR_LOAD: Specifies whether to load from 'DIR_ADD' directories (0=no,1=yes,2=mandatory)
(input flags): NUMERIC
DIR_ADD: Adds a directory from which ENGINEs can be loaded
(input flags): STRING
LOAD: Load up the ENGINE specified by other settings
(input flags): NO_INPUT
To list the capabilities of the rsax engine:
$ openssl engine -c
(rsax) RSAX engine support
[RSA]
(dynamic) Dynamic engine loading support
ENVIRONMENT
OPENSSL_ENGINES
The path to the engines directory.
SEE ALSO config(5)COPYRIGHT
Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a
copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
1.1.1a 2018-12-18 ENGINE(1SSL)