Sponsored Content
Top Forums Shell Programming and Scripting remove specific lines from flat file using perl Post 302166742 by meghana on Tuesday 12th of February 2008 05:00:56 PM
Old 02-12-2008
Thats works... i have a tab in the beginning of a line.. can you tell me how to represent a "tab" in a search string... i used ($line =~ m/^\*/) && ($line =~ m/^\ /) .. respectively for a '*' character and ' ' space.. need to work to get a "tab" too...

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove specific lines from a file

Hi there I have a file with a variable amount of rows but the 45th, 46th and 47th charachter of each line is the status field which is a three digit code ie 001, 002, 003 etc. My question is this..I need to strip all the records/lines with 002's out of the file completely and put them into... (14 Replies)
Discussion started by: hcclnoodles
14 Replies

2. Shell Programming and Scripting

how to remove specific lines from a file

When restoring a file in my uninstall program I need to remove the lines I added to a file during the install. In between the file can be modified by the users. Assume file1 is as follow: xxx str2 xxxx ..... ...The Following lines containing str* have to be removed... xxx str1 xxxx xxx ... (17 Replies)
Discussion started by: bluemoon1
17 Replies

3. Shell Programming and Scripting

How to remove the lines from file using perl

Can anyone tell me what could be the solution to following : I have one .txt file which contains some seed information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed. here is the contents of .txt... (5 Replies)
Discussion started by: dipakg
5 Replies

4. Shell Programming and Scripting

How to remove the specific lines from file using perl

Can anyone tell me what could be the solution to following : I have one .txt file which contains some "seed" information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed. Please provide the script code... (4 Replies)
Discussion started by: dipakg
4 Replies

5. Shell Programming and Scripting

how to remove specific lines from a file (reprise)

Hello, I've to change the shell in /etc/passwd for some users . I've the list of users but I'm not able to modify the file with scripting . I'm working on a Sol10 . Can anyone help me ? tnks (7 Replies)
Discussion started by: gogol_bordello
7 Replies

6. UNIX for Dummies Questions & Answers

how to remove the first line from a flat file ?

Hi, I want to remove the first line from a flat file using unix command as simple as possible. Can anybody give me a hand ? Thanks in advance. xli (21 Replies)
Discussion started by: xli
21 Replies

7. UNIX for Dummies Questions & Answers

Search flat file in specific byte

I am on AIX Unix. I want to read a flat file for a string in a certain byte. I want to find the value: 943034 in column 56; and write out just those records to another file. Also, could I get the line/record number of where it was found in the input file? Thank you, sboxtops (1 Reply)
Discussion started by: sboxtops
1 Replies

8. Shell Programming and Scripting

Remove somewhat Duplicate records from a flat file

I have a flat file that contains records similar to the following two lines; 1984/11/08 7 700000 123456789 2 1984/11/08 1941/05/19 7 700000 123456789 2 The 123456789 2 represents an account number, this is how I identify the duplicate record. The ### signs represent... (4 Replies)
Discussion started by: jolney
4 Replies

9. UNIX for Advanced & Expert Users

Remove duplicates in flat file

Hi all, I have a issues while loading a flat file to the DB. It is taking much time. When analyzed i found out that there are duplicates entry in the flat file. There are 2 type of Duplicate entry. 1) is entire row is duplicate. ( i can use sort | uniq) to remove the duplicated entry. 2) the... (4 Replies)
Discussion started by: samjoshuab
4 Replies

10. Shell Programming and Scripting

awk to remove lines in file if specific field matches

I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :). grep grep -v -F -f targets.bed sort_list grep -vFf sort_list targets awk awk -F, ' > FILENAME == ARGV {to_remove=1; next} > ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
PS_SET_TEXT_POS(3)							 1							PS_SET_TEXT_POS(3)

ps_set_text_pos - Sets position for text output

SYNOPSIS
bool ps_set_text_pos (resource $psdoc, float $x, float $y) DESCRIPTION
Set the position for the next text output. You may alternatively set the x and y value separately by calling ps_set_value(3) and choosing textx respectively texty as the value name. If you want to output text at a certain position it is more convenient to use ps_show_xy(3) instead of setting the text position and call- ing ps_show(3). PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $x - x-coordinate of the new text position. o $y - y-coordinate of the new text position. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Placing text at a given position <?php $ps = ps_new(); if (!ps_open_file($ps, "text.ps")) { print "Cannot open PostScript file "; exit; } ps_set_info($ps, "Creator", "rectangle.php"); ps_set_info($ps, "Author", "Uwe Steinmann"); ps_set_info($ps, "Title", "Text placement example"); ps_begin_page($ps, 596, 842); $psfont = ps_findfont($ps, "Helvetica", "", 0); ps_setfont($ps, $psfont, 8.0); ps_show_xy($ps, "Some text at (100, 100)", 100, 100); ps_set_value($ps, "textx", 100); ps_set_value($ps, "texty", 120); ps_show($ps, "Some text at (100, 120)"); ps_end_page($ps); ps_delete($ps); ?> SEE ALSO
ps_set_value(3), ps_show(3). PHP Documentation Group PS_SET_TEXT_POS(3)
All times are GMT -4. The time now is 02:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy