Sponsored Content
Top Forums Shell Programming and Scripting Read 1-line file and separate into multiple variables Post 302423285 by numele on Thursday 20th of May 2010 02:21:47 PM
Old 05-20-2010
Thank you! I'll give it a try as it looks like it will work for me.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script to read a hostname and separate into variables

Hi All, I'm trying to concoct a bash script to use with a Puppet Implementation that will accept a hostname and break it down into variables. For example, my hostnames look like this --> machinename-group-building.example.com I'm looking for a way in the script to read until the first... (4 Replies)
Discussion started by: glarizza
4 Replies

2. Shell Programming and Scripting

How to separate file to multiple line.

Hi Unix gurus, I am facing a problme with file. I need separate my file into multiple line. eg. Soure file: PRT07, aaa, bbb, 46, PRT06, ccc, ddd, 57, PRT05, eee,fff,aa, target file: PRT07, aaa, bbb, 46 PRT06, ccc, ddd, 57 PRT05, eee,fff,aa :wall: thanks in advance (4 Replies)
Discussion started by: ken002
4 Replies

3. Shell Programming and Scripting

Read file and for each line replace two variables, add strings and save output in another file

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)
Discussion started by: Andy_ARG
5 Replies

4. Shell Programming and Scripting

read one line file and separate into multiple lines

I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field. example input line: ... (2 Replies)
Discussion started by: erlanq
2 Replies

5. Shell Programming and Scripting

read one line file and separate into multiple lines

I have one long line text with semicolon used as separator between values in that line. Now, I want to separate the line into multiple line right after every 29th field. example input line: ... (1 Reply)
Discussion started by: erlanq
1 Replies

6. Shell Programming and Scripting

Shell script to read multiple options from file, line by line

Hi all I have spent half a day trying to create a shell script which reads a configuration file on a line by line basis. The idea of the file is that each will contain server information, such as IP address and various port numbers. The line could also be blank (The file is user created). Here... (1 Reply)
Discussion started by: haggismn
1 Replies

7. Shell Programming and Scripting

Read each line and saving the line in separate files

Hi Experts, I am having a requirement like this; Input file EIM_ACCT.ifb|1001|1005 EIM_ADDR.ifb|1002|1004 EIM_ABD.ifb|1009|1007 I want to read each line of this file and pass each line,one at a time,as an argument to another script. eg; 1.read first line->store it to a file->call... (2 Replies)
Discussion started by: ashishpanchal85
2 Replies

8. Programming

Read text from file and print each character in separate line

performing this code to read from file and print each character in separate line works well with ASCII encoded text void preprocess_file (FILE *fp) { int cc; for (;;) { cc = getc (fp); if (cc == EOF) break; printf ("%c\n", cc); } } int main(int... (1 Reply)
Discussion started by: khaled79
1 Replies

9. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies

10. UNIX for Dummies Questions & Answers

Read in Multiple log files and output selected variables and values to cvs file

I have several problems with my problems: I hope you can help me. 1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error. For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies
plot(4B)					   SunOS/BSD Compatibility Package File Formats 					  plot(4B)

NAME
plot - graphics interface DESCRIPTION
Files of this format are interpreted for various devices by commands described in plot(1B). A graphics file is a stream of plotting instructions. Each instruction consists of an ASCII letter usually followed by bytes of binary information. The instructions are executed in order. A point is designated by four bytes representing the x and y values; each value is a signed integer. The last designated point in an l, m, n, or p instruction becomes the ``current point'' for the next instruction. m Move: the next four bytes give a new current point. n Cont: draw a line from the current point to the point given by the next four bytes. See plot(1B). p Point: plot the point given by the next four bytes. l Line: draw a line from the point given by the next four bytes to the point given by the following four bytes. t Label: place the following ASCII string so that its first character falls on the current point. The string is terminated by a NEW- LINE. a Arc: the first four bytes give the center, the next four give the starting point, and the last four give the end point of a circu- lar arc. The least significant coordinate of the end point is used only to determine the quadrant. The arc is drawn counter- clockwise. c Circle: the first four bytes give the center of the circle, the next two the radius. e Erase: start another frame of output. f Linemod: take the following string, up to a NEWLINE, as the style for drawing further lines. The styles are ``dotted,'' ``solid,'' ``longdashed,'' ``shortdashed,'' and ``dotdashed.'' Effective only in plot 4014 and plot ver. s Space: the next four bytes give the lower left corner of the plotting area; the following four give the upper right corner. The plot will be magnified or reduced to fit the device as closely as possible. Space settings that exactly fill the plotting area with unity scaling appear below for devices supported by the filters of plot(1B). The upper limit is just outside the plotting area. In every case the plotting area is taken to be square; points outside may be displayable on devices whose face is not square. 4014 space(0, 0, 3120, 3120); ver space(0, 0, 2048, 2048); 300, 300s space(0, 0, 4096, 4096); 450 space(0, 0, 4096, 4096); SEE ALSO
graph(1), plot(1B) SunOS 5.10 18 Feb 2003 plot(4B)
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy