Sponsored Content
Top Forums Shell Programming and Scripting Exporting Values of Variables to Another File Post 302614365 by Corona688 on Wednesday 28th of March 2012 12:24:40 PM
Old 03-28-2012
Code:
./subject < data

By redirecting data into ./subject with <, you are replacing it's standard input. read will read from the file, not the keyboard.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

exporting variables (shell scripting)

Hi, i've got an executable shell script, called mysc.sh with this line only: export DATASIZE=0 i run it from my console (./mysc.sh), and after that in the console i run: echo $DATASIZE and nothing prints what could be the problem??? thanks!! (2 Replies)
Discussion started by: kfad
2 Replies

2. Shell Programming and Scripting

[BASH] mapping of values from file line into variables

Hello, I've been struggling with this for some time but can't find a way to do it and I haven't found any other similar thread. I'd like to get the 'fields' in a line from a file into variables in just one command. The file contains data with the next structure:... (4 Replies)
Discussion started by: semaler
4 Replies

3. Shell Programming and Scripting

Assign Values to variables from a text file

The text file has one single row and looks like this Q1 P1 2006 I have to pick up this values from a shell script into three different variables, say quarter, period and year from the above text file. Some one know's how to do this? I went through 'sed', dint really know how to... (3 Replies)
Discussion started by: sarsani
3 Replies

4. Shell Programming and Scripting

Exporting variables from subshell to parent shell

Hi, I was trying to do something where I would be able to export one local variable in a telnet subshell to its parent shell. I found something like this over here, but couldnt exactly understand it :(. I am referring to this part actually: #! /usr/bin/ksh exec 4>&1 tail -5 >&4 |& exec... (4 Replies)
Discussion started by: King Nothing
4 Replies

5. Shell Programming and Scripting

Read variables and their values from file

Hi, I want to read the variables and the values from the txt file and compare these values with the ones computed by script. for ex: say var.txt contains the variable names and their values: one 1 two 2 three 3 The value of variables "one" "two" and "three" will be computed in the script... (3 Replies)
Discussion started by: bhushana
3 Replies

6. Shell Programming and Scripting

Assign values to variables of a file

Hi, I have a file like the following... CUST= DIR= NULIST= name=philps_123 How can i add values to each of these unassigned variables using a shell script? say for eg: i have values for CUST as onida, dir as /dir/onida, NULIST as /tmp/onida_files. How can i add these values to... (11 Replies)
Discussion started by: Tuxidow
11 Replies

7. Shell Programming and Scripting

Parse config file and store the values in variables

Hi, I have a config file that has blank, commented lines. I need to escape commented lines, blank lines, parse the remaining lines and store them in variables or array. the config file contains the following lines. # config file # Define Oracle User ORA_USER=abcde ORA_PASS=xyzabc... (8 Replies)
Discussion started by: Lakshmi Chowdam
8 Replies

8. Shell Programming and Scripting

Help in assigning values to variables from the file

Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file. I've the following values stored in the file.. It consists of only two rows.. 10 20 I want to assign the first row value to variable "n1" and the second row value to variable "n2".. That is ... (3 Replies)
Discussion started by: abk07
3 Replies

9. Shell Programming and Scripting

How to fetch values from a line in a file to variables in UNIX?

Hi, I need to assign values from a lines in a file into variables in unix, i am using Korn shell. I tried the below script from posts but i am unable to fetch every value in a variable. #! /usr/bin/ksh #for file in test.txt; do IFS=$'\|' I=1 while read -a val do echo... (15 Replies)
Discussion started by: karthikram
15 Replies

10. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies
NNSPEW(8)						      System Manager's Manual							 NNSPEW(8)

NAME
nnspew - subject database manager (nn) SYNOPSIS
nnspew DESCRIPTION
nnspew builds a sorted database of all available subjects in the nn article database for fast access via the nngrab utility. nnspew should be activated regularly to rebuild the subject database, e.g. by cron. For example: 2 6,9,12,15,18,21 * * * root /bin/nice /usr/lib/nn/nnspew Cross posted articles are only represented in the database once, and identical subjects in each group are merged into one to use a minimum of disk space. This saves about 50% of the disk space otherwise required. FILES
$db/subjects subject database SEE ALSO
nn(1), nngrab(1), egrep(1) NOTES
nngrap will use the subject database generated by nnspew independent of its age. Thus, if you stop running nnspew, remember to remove the subjects file as well. BUGS
nnmaster should automatically append new articles to the subject database to keep it up-to-date, and thus require less frequent rebuilding using nnspew. AUTHOR
James A. Woods, NASA Ames Research Center E-mail: jaw@ames.arc.nasa.gov 4th Berkeley Distribution Release 6.6 NNSPEW(8)
All times are GMT -4. The time now is 08:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy