I'm very new to Linux, and I have a question, I'm hoping you could help me with.
I have created a file called subject, contains this code:
I'm to create another file called data in the same directory and that file is supposed to import the variables from the subject and print their values.
However the above code doesn't import any value from the subject file, and just prints blank.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Perl::Critic::Policy::Editor::RequireEmacsFileVariables(User Contributed Perl DocumentatPerl::Critic::Policy::Editor::RequireEmacsFileVariables(3)NAME
Perl::Critic::Policy::Editor::RequireEmacsFileVariables - Per-file editor settings.
AFFILIATION
This policy is part of Perl::Critic::More, a bleeding edge supplement to Perl::Critic.
DESCRIPTION
Many text editors know how to find magic strings in files that indicate settings that work best for that file. For example, the file can
indicate that it expects four-character indentation.
In emacs, this magic string is called "File Variables". There are two syntaxes:
"-*- ... -*-" (single-line) and
"Local Variables:
...
End:" (multi-line). Both syntaxes allow leading and trailing text on the line.
The single-line syntax must be used on the first line of the file to be recognized, or on the second line if the first line is a shebang.
The following examples are explicitly allowed by Perl:
#!perl -w -*- cperl -*-
#!perl -w # -*- cperl -*-
#!perl # -*- cperl -*-
The multi-line syntax must be used "in the last page" (that is, after the last formfeed) at the end of the file. As of Emacs21, the "end
of the file" is hard-coded to be the last 3000 bytes of the file (in the hack-local-variables function in files.el). In this syntax, each
line must begin and end with the same prefix/suffix pair. That pair is defined by the text before and after the "Local Variables:" string.
SEE ALSO
Perl::Critic::Policy::Editor::RequireViModeline
<http://www.gnu.org/software/emacs/manual/html_node/File-Variables.html>
In Emacs, you can view the "File Variables" info node by typing: "Help-key", "i", "g", "(emacs)File Variables" (where "Help-key" is often
"C-h" or "F1".)
Alternatively, you can execute the following elisp:
(info "(emacs)File Variables")
AUTHOR
Chris Dolan <cdolan@cpan.org>
Michael Wolf <MichaelRWolf@att.net>
COPYRIGHT
Copyright (c) 2006-2008 Chris Dolan
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-10 Perl::Critic::Policy::Editor::RequireEmacsFileVariables(3)