Sponsored Content
Full Discussion: Read input in shell script
Top Forums Shell Programming and Scripting Read input in shell script Post 302947308 by sea on Wednesday 17th of June 2015 07:53:11 AM
Old 06-17-2015
Hiya

Code:
output=""
input=""
while
    echo "$output"
    read input
do output+=" $input"
    # Well this goes forever until you hit CTRL+C
done

hth
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read a file as input and pass each line to another script

Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names. My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
Discussion started by: sajjad02
0 Replies

2. Shell Programming and Scripting

How can I send the input of a read line command through a shell script

Hi All, I wish to automate the unix command 'su' through a shell script. I would like to pass the content of a file as password to 'su' command. My script is as below, #! /bin/sh su userA while read line do rpm -ivh $line done < pwd.txt where pwd.txt contains the password of... (6 Replies)
Discussion started by: little_wonder
6 Replies

3. Shell Programming and Scripting

Need a script that will read from 2 input file

Hi Everyone. I am new in this scripting world. I need to know about script that I can use on linux/sun operating systems. I have 2 input file. File 1: Its has an header information and then data in 2 different columns. File 2 : It has data in 9 different columns/ I need an script that... (3 Replies)
Discussion started by: syahmed
3 Replies

4. Shell Programming and Scripting

need shell or Perl script to read multiple input

I need shell 0r Perl script to read multiple input and do something and come out example: echo “ enter the host names separated by space “ read servers foreach @servers { do do something done} Here host names like host1 host2 host3 . . . . . . . so on Please help me... (8 Replies)
Discussion started by: sreedhargouda
8 Replies

5. Shell Programming and Scripting

Read input and output redirection filename within a script

Hello everyone, My requirement is that within a script I need to construct the command line exactly that it was invoked with. For example : sh a.sh arg1 arg2 arg3 < input.txt > output.txt Now within a.sh, I construct a file which has these contents " sh a.sh arg1 arg2 arg3 < input.txt >... (8 Replies)
Discussion started by: hedonist12
8 Replies

6. Shell Programming and Scripting

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each

The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies

7. Shell Programming and Scripting

Read input from file and pass it to sub shell

i have a scenario where in i have to monitor jobs which run in different servers, The job details(job name, host server, etc) are present in a dat file. I have written a script a script which reads the details from the dat file and calls a local method where the job monitoring logic is present.... (2 Replies)
Discussion started by: abubucker0
2 Replies

8. Shell Programming and Scripting

Shell read command is not waiting for user input

Hi, i am working on one automation , for that i have writing one shell program that take user input in "while read line" block. but read command is taking value that is readed by While block. while read line; do command 1; command 2 echo -n "Do you want to continute > " read rsp... (2 Replies)
Discussion started by: ranvijaidba
2 Replies

9. Shell Programming and Scripting

How to get the shell script to read the .txt file as an input/data?

i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies

10. Shell Programming and Scripting

Script does not read input file

Hi everyone, I have problems with this script. This script should check for a folder for each server in the list of the list.txt file. The script only checks the first host, and then exits, why? #!/bin/bash file='/etc/list.txt' while read line; do echo $line if ssh root@$line "stat /var >... (2 Replies)
Discussion started by: nashrik
2 Replies
PCP(9.1)																  PCP(9.1)

NAME
pcp - copy pictures SYNOPSIS
fb/pcp [ -wx0 y0 x1 y1 ] [ -ox y ] [ -ttype ] [ -cchannels ] [ -Cchannels ] [ -mcolormap ] [ -M ] [ input [ output ] ] DESCRIPTION
Pcp copies the input picture (default standard input) to the output file (default standard output). Options control the attributes and content of the output picture. -w x0 y0 x1 y1 causes only the given window of the input picture to be copied. By default the whole picture is copied. -o x y causes the output picture's WINDOW= attribute to be translated by adding (x,y) to the input window coordinates. -t type sets the TYPE= attribute of the output file. The default is to use the input file's type. -c channels causes only the given channels of the input picture to be copied. The default is to copy all channels. If channels not present in the input picture are specified, they are computed in the ``most plausible'' way. For example, a missing alpha channel is set to 255, and an m channel will be synthesized from rgb channels by computing NTSC luminance. A 0 in channels causes a zero channel to be written. -C channels sets the output CHAN= attribute. Channels must be the same length as the selected channels of the input picture. -m colormap attaches the given color map to the output. -M elides the color map from the output. SOURCE
/sys/src/fb/pcp.c SEE ALSO
picfile(9.6), cmap(9.6) PCP(9.1)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy