Sponsored Content
Top Forums Shell Programming and Scripting Finding a string in a text file and posting part of the line Post 302406799 by kurumi on Wednesday 24th of March 2010 12:36:02 AM
Old 03-24-2010
Code:
sed -n 's/^helloworld//p' file

Code:
 sed -n '/^hello/s/..........//p' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding a certain string on each line in a file

Hi, I need a script to get every line from a file where there are less then 17 ; on a line. Thank's (5 Replies)
Discussion started by: VODAFUN
5 Replies

2. Shell Programming and Scripting

Finding part of a string

Hi I am very new to KSH programming and need some help with finding a string in an error log currently i am doing cat FTP_LOG.lis | grep Warning which gives me Warning: Authentication failed. Remaining authentication methods: 'publickey,pas I want to only pick up the test between the... (4 Replies)
Discussion started by: DAFNIX
4 Replies

3. UNIX for Dummies Questions & Answers

how can search a String in one text file and replace the whole line in another file

i am very new to UNIX plz help me in this scenario i have two text files as below file1.txt name=Rajakumar. Discipline=Electronics and communication. Designation=software Engineer. file2.txt name=Kannan. Discipline=Mechanical. Designation=CADD Design Engineer. ... (6 Replies)
Discussion started by: kkraja
6 Replies

4. Shell Programming and Scripting

How to insert string at particular 4th line in text file

I just want to add a particular string in text file using shell script text file format 1 columns-10 2 text=89 3 no<> 4 5 test-9876 6 size=9 string need to insert in 4th line <switch IP='158.195.2.567' port='5900' user='testc' password='asdfrp' Code='8'> After inserting the... (8 Replies)
Discussion started by: puneet.goel
8 Replies

5. Shell Programming and Scripting

Reformatting single column text file starting new line when finding particular string

Hi, I have a single colum file and I need to reformat the file so that it creates a new line every time it come to an IP address and the following lines are corresponding rows until it comes to the next IP address. I want to turn this 172.xx.xx.xx gwpusprdrp02_pv seinwnprd03... (7 Replies)
Discussion started by: kieranfoley
7 Replies

6. Shell Programming and Scripting

[Solved] Printing a part of the last line of the specific part of a file

Hi, I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this: Name =A xxxxxx yyyyyy zzzzzz aaaaaa bbbbbb Value = 57 This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies

7. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

8. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

9. Shell Programming and Scripting

Reading text file, comparing a value in a line, and placing only part of the line in a variable?

I need some help. I would like to read in a text file. Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01. Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies

10. Shell Programming and Scripting

Finding pattern in a text file and returning a part of the word

Dear All, assume that we have a text file or a folder of files, I want to find this pattern followers*.csv in the text file , and get * as the output. There are different matches and * means every character. Thank you in advance. Best, David (1 Reply)
Discussion started by: davidfreed
1 Replies
PLPTEX3(3plplot)						    PLplot API							  PLPTEX3(3plplot)

NAME
plptex3 - Write text inside the viewport of a 3D plot. SYNOPSIS
plptex3(x, y, z, dx, dy, dz, sx, sy, sz, just, text) DESCRIPTION
Writes text at a specified position and inclination and with a specified shear within the viewport. Text is clipped at the viewport bound- aries. The reference point of a string lies along a line passing through the string at half the height of a capital letter. The position of the reference point along this line is determined by just, and the reference point is placed at world coordinates (x, y, z) within the viewport. The inclination and shear of the string is specified in terms of differences of world coordinates making it easy to write text parallel to a line in a graph. Redacted form: plptex3(x, y, z, dx, dy, dz, sx, sy, sz, just, text) This function is used in example 28. ARGUMENTS
x (PLFLT, input) x coordinate of reference point of string. y (PLFLT, input) y coordinate of reference point of string. z (PLFLT, input) z coordinate of reference point of string. dx (PLFLT, input) Together with dy and dz, this specifies the inclination of the string. The baseline of the string is parallel to a line joining (x, y, z) to (x+dx, y+dy, z+dz). dy (PLFLT, input) Together with dx and dz, this specifies the inclination of the string. dz (PLFLT, input) Together with dx and dy, this specifies the inclination of the string. sx (PLFLT, input) Together with sy and sz, this specifies the shear of the string. The string is sheared so that the characters are vertically par- allel to a line joining (x, y, z) to (x+sx, y+sy, z+sz). If sx = sy = sz = 0.) then the text is not sheared. sy (PLFLT, input) Together with sx and sz, this specifies shear of the string. sz (PLFLT, input) Together with sx and sy, this specifies shear of the string. just (PLFLT, input) Specifies the position of the string relative to its reference point. If just=0., the reference point is at the left and if just=1., it is at the right of the string. Other values of just give intermediate justifications. text (const char *, input) The string to be written out. AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere. SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources. August, 2012 PLPTEX3(3plplot)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy