thanks so far for your replies. I kind of have the feeling too that it is somehow related to the calls.txt
I thought the minimal example would do the job, but let's give you a more real copy of what I have done:
my.sh :
my calls.txt is just a one liner right now, but later many lines according to the same format shall follow:
so this is exactly a renamed representation of the calls.txt. Sorry for the censorship, but in fact I am currently developing a software tool I am ofc not allowed to share everything in detail :/
I came up with the thoughts of maybe the paths messing it up? I 'll retry with quoting the paths. Other ideas?
Hi All,
I'll get a file whose 2nd line contains 3 fields: filename(variable length), file size char(10), and record count int(10). How do I cut it and put it into 3 variables?
eg: abcd.csv01234567891111111111
now I want: $one = abcd.csv, $two = 0123456789, $three = 1111111111.
I also... (8 Replies)
I would like to make a script to read three variables (no fixed length or position) from a line and write them into a file, with fixed length and right-justified in each column. The fixed text (text1-text4) prior to the thee variables and the variables themselves are originally separated by spaces... (3 Replies)
I need to save my enviroment variables,specially the $PATH.When I put it on .cshrc at next reboot I lost the configuration.How can avoid this?Thanks (2 Replies)
I have one line files with 17 records separated by a semi-colon. I need to create a variable from each record, which I can do via a separate awk for each one, but I know there has to be a better way. Along with pulling out the variable, I need to convert some url coding like a + to a space, etc.... (4 Replies)
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
Hey all,
Unfortunately I have only basic knowledge of awk and/or scripting. If I have a file with lines that can look similar to this:
Name=line1 Arg1=valueA Arg2=valueB Arg3=valueC
Name=line2 Arg1=valueD
Name=line3 Arg1=valueE Arg3=valueF
Name=line4 Arg2=valueG ... (4 Replies)
How can I read a string delimited on spaces and assign the fields to incremented variables.
For example:
Given $exts= txt dat mov
I want to read in $exts and have "txt" "dat" and "mov" assigned to incremented variables like $ext1, $ext2, etc. I would like to do this in a loop so that I can... (4 Replies)
Hi,
This is my first post here and I am a newbie. :)
I have a file that looks like this :
Introduction:Intro_123.html
Product definition:Prod_def.html
System Setup:SSetup-64bit.html
Setting up user accounts:Set_user_acc.html
I tried to create a script that would output "The filename... (3 Replies)
Hey guyz,
I have a table which shows the presence or absence of my variables (A,B,C,...) in my observations (1,2,3,...)
* A B C ...
1 1 0 1
2 1 1 0
3 1 0 0
...
I want to calculate the co-presence of my variables. to have a table shows the pairwise presence of the variables (have... (1 Reply)
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
Discussion started by: winston6071
0 Replies
LEARN ABOUT OSF1
read
read(1) General Commands Manual read(1)NAME
read - Reads a line from standard input
SYNOPSIS
read [-r] var...
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
read: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
Do not treat a backslash character in any special way. Consider each backslash to be part of the input line.
Note
The -r option is included to enable read to subsume the purpose of the obsolete line utility.
OPERANDS
The name of an existing or non-existing shell variable.
DESCRIPTION
The read utility reads a single line from standard input.
By default, unless the -r option is specified, backslash () acts as an escape character. If standard input is a terminal device and the
invoking shell is interactive, read prompts for a continuation line in the following cases: The shell reads an input line ending with a
backslash, unless the -r option is specified. A here-document is not terminated after a newline character is entered.
The line is split into fields as in the shell (see the sh(1) reference page); the first field is assigned to the first variable var, the
second field to the second variable var, and so forth. If there are fewer var parameters specified than there are fields, the leftover
fields and their intervening separators are assigned to the last var. If there are fewer fields than vars, the remaining vars are set to
empty strings.
The setting of variables specified by the var parameters affects the current shell execution environment. If read is called in a subshell
or separate utility execution environment, such as one of the following, it does not affect the shell variables in the caller's environ-
ment:
(read foo) nohup read ... find . -exec read ... ;
NOTES
The -r option is included to enable read to subsume the purpose of the obsolete line utility.
RESTRICTIONS
The results are undefined if an end-of-file is detected following a backslash at the end of a line when -r is not specified.
EXIT STATUS
The following exit values are returned: Successful completion. End-of-file was detected or an error occurred.
EXAMPLES
The following command prints 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
ENVIRONMENT VARIABLES
The following environment variables affect the execution of read: Determines the internal field separators used to delimit fields. Pro-
vides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value
from the default locale is used. If any of the internationalization variables contain an invalid setting, the utility behaves as if none
of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization vari-
ables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed
to multibyte characters in arguments). Determines the locale used to affect the format and contents of diagnostic messages written to
standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. Provides the prompt string that an
interactive shell will write to standard error when a line ending with a backslash is read and the -r option was not specified, or if a
here-document is not terminated after a newline character is entered.
SEE ALSO
Commands: line(1)
Functions: fread(3)
Standards: standards(5)read(1)