Sponsored Content
Top Forums Shell Programming and Scripting usage of echo with standard input Post 302251532 by calandrea on Monday 27th of October 2008 10:49:32 AM
Old 10-27-2008
I am afraid I haven't given enough details about my case.
I will try to be more clear posting what I am doing.
I want to add the time information contained in the filename inside the file using the command:
sh AddTim < filename-0.5_s.dat > filename-0.5_s.out
where AddTim is:
#!/bin/sh
time=$(echo $1 | cut -d "-" -f2 | cut -d "_" -f1)
sed "s/X/X, TIME=$time/"

Unfortunately, the resulting time information is blank!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

standard input

how can i redirect standard input? i dont remember :/, though could you redirec not from a command? i mean, to redirect always stdin and stout (1 Reply)
Discussion started by: Jariya
1 Replies

2. Shell Programming and Scripting

How to copy from standard input

I tried copy the output files from find command into a directory. Example, find / -name core 2>/dev/null | xargs cp???? I have known that we can use xargs to execute command lines from standard input but how to use it in this case. Or I can do something besides xargs. (2 Replies)
Discussion started by: lalelle
2 Replies

3. Shell Programming and Scripting

change standard input ?

Dear... I have a scrpit that contains multiple read command.... when I run the script I have to enter 3 variables so that I can get the output.. but, I dont want to put those 3 inputs manually every time... I want to make a shell that reads the 3 inputs from a file. the script name is... (4 Replies)
Discussion started by: yahyaaa
4 Replies

4. Shell Programming and Scripting

Command Output to Standard Input

Hi All, How do I provide the output of a command to another command which is waiting for an input from the user ? Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Discussion started by: sushant172
1 Replies

5. Solaris

standard input

Please give me any example for standard input in Solaris. (6 Replies)
Discussion started by: karman0931
6 Replies

6. Shell Programming and Scripting

Send data to standard input

Hello, I'm writting a korn script that executes a daemon in a remote server. The problem is that daemon doesn't go background until it receives an enter from the standard input, and it maintains the rsh opened until it get it. I'm looking for the best (efficient and elegant) way to do send the... (3 Replies)
Discussion started by: nefeli
3 Replies

7. Shell Programming and Scripting

Reading Standard Input

Hello, I am new to scripting. How do I read multiple lines from the command line? I know read reads one line, but if I have to read multiple lines, how should I do? Thanks, Prasanna (4 Replies)
Discussion started by: prasanna1157
4 Replies

8. Shell Programming and Scripting

Reading from standard input

So, I am new to shell scripting and have a few problems. I know how to read from standard input but I do not know how to really compare it to say, a character. I am trying to compare it to a character and anything exceeding just a character, the user will get an output message, but the program... (7 Replies)
Discussion started by: Bungkai
7 Replies

9. Shell Programming and Scripting

standard input and cron

I have a program that requires the user to enter input values while it is being run for example in bash ... ... .. echo "Enter your input" read input echo $input ... ... ...I need to schedule this program with crontab, hence a problem, cronjobs run in the background, any ideas on how to... (10 Replies)
Discussion started by: walforum
10 Replies

10. Homework & Coursework Questions

Removing punctuations from file input or standard input

Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints. 1. The problem statement, all variables and given/known data: How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 Replies
NSEQ(1SSL)                                                            OpenSSL                                                           NSEQ(1SSL)

NAME
openssl-nseq, nseq - create or examine a Netscape certificate sequence SYNOPSIS
openssl nseq [-help] [-in filename] [-out filename] [-toseq] DESCRIPTION
The nseq command takes a file containing a Netscape certificate sequence and prints out the certificates contained in it or takes a file of certificates and converts it into a Netscape certificate sequence. OPTIONS
-help Print out a usage message. -in filename This specifies the input filename to read or standard input if this option is not specified. -out filename Specifies the output filename or standard output by default. -toseq Normally a Netscape certificate sequence will be input and the output is the certificates contained in it. With the -toseq option the situation is reversed: a Netscape certificate sequence is created from a file of certificates. EXAMPLES
Output the certificates in a Netscape certificate sequence openssl nseq -in nseq.pem -out certs.pem Create a Netscape certificate sequence openssl nseq -in certs.pem -toseq -out nseq.pem NOTES
The PEM encoded form uses the same headers and footers as a certificate: -----BEGIN CERTIFICATE----- -----END CERTIFICATE----- A Netscape certificate sequence is a Netscape specific format that can be sent to browsers as an alternative to the standard PKCS#7 format when several certificates are sent to the browser: for example during certificate enrollment. It is used by Netscape certificate server for example. BUGS
This program needs a few more options: like allowing DER or PEM input and output files and allowing multiple certificate files to be used. COPYRIGHT
Copyright 2000-2017 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 NSEQ(1SSL)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy