File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Hi,
I need to parse a simple text file like below and store the word that starts with BR* to a variable say $BRno. I need to do this in sh script.
NOTE: the length of the numbers following BR is in constant. And there is only 1 BRXXX in a file at a given time.
.txt file:
BR276828... (1 Reply)
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)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
1)In a particualr path i have a set of inputfiles like
path:/defaultmis/MonthlyLoads/INFA_EXPORT_022013/map*
example:
1)map_de
2)map_cod
3)map_feg
........and so on
in above path there wil be nearly 15 to 20 files starting with map and in other path i have another file input file... (4 Replies)
hi,
i have a variable, in which i am storing the file names that are present in the current directory.
$ls -1
s1.txt
s2.txt
s3.txt
$FILES=`ls -ltr | grep "^-" | awk '{print $NF}'`
$echo $FILES
s1.txt
s2.txt
s3.txt
i want to store the files names in a single line in the variable... (7 Replies)
Hi,
I need a help on my requirement that
eg: NEED="TEST=Name WORK=Ps DEL=let"
Here the definition can be n number, could anybody have an idea to get the output as,
TEST=Name
WORK=Ps
DEL=let
..
..
till the 'n' definitions listed.
Any suggestions please.....
Regards,
ricky (6 Replies)
Hi All,
I am writing a script in which I need to gather 2 numbers for 'total' and 'successful'. The goal is to compare the two numbers and if they are not equal, rerun the task until all are successful. I'm thinking the best way will be with awk or sed, but I really don't know where to begin... (8 Replies)
Discussion started by: hburnswell
8 Replies
LEARN ABOUT HPUX
read
read(1) General Commands Manual read(1)NAME
read - read a line from standard input
SYNOPSIS
var ...
DESCRIPTION
reads a single line from standard input. The line is split into fields as when processed by the shell (refer to shells in the first field
is assigned to the first variable var, the second field to the second variable var, and so forth. If there are more fields than there are
specified var operands, the remaining fields and their intervening separators are assigned to the last var. If there are more vars than
fields, the remaining vars are set to empty strings.
The setting of variables specified by the var operands affect the current shell execution environment.
Standard input to can be redirected from a text file.
Since affects the current shell execution environment, it is usually provided as a normal shell special (built-in) command. Thus, if it is
called in a subshell or separate utility execution environment similar to the following, it does not affect the shell variables in the
caller's environment:
Options
recognizes the following options:
Do not treat a backslash character in any special way.
Consider each backslash to be part of the input line.
Opperands
recognizes the following operands:
var The name of an existing or nonexisting shell variable.
EXTERNAL INFLUENCES
Environment Variables
determines the internal field separators used to delimit fields.
RETURN VALUE
exits with one of the following values:
0 Successful completion.
>0 End-of-file was detected or an error occurred.
EXAMPLES
Print a file with the first field of each line moved to the end of the line.
while read -r xx yy
do
printf "%s %s
" "$yy" "$xx"
done < input_file
SEE ALSO csh(1), ksh(1), sh(1), sh-posix(1).
STANDARDS CONFORMANCE read(1)