Sponsored Content
Full Discussion: Difficult Filtering Problem
Top Forums UNIX for Advanced & Expert Users Difficult Filtering Problem Post 37841 by Perderabo on Monday 30th of June 2003 04:06:49 PM
Old 06-30-2003
Try this:
Code:
#! /usr/bin/ksh
target=hdfhasdjkasdhs

sed -n -e "
:loop
s/^$//
t test
H
n
b loop
:test
g
s/${target/${target}/
t want
s/^.*//
h
d
:want
p
:final
s/^.*//
h"
exit 0

 

10 More Discussions You Might Find Interesting

1. Solaris

difficult time differences

:rolleyes: Hi, How to take the time diffence between start and finish time from a log file? It is like ..... started at Jun 20 23:20 . . ..... finished at Jun 21 01:40 Tryed so many ways but failed to ger exact way. :confused: Your help will be honoured. Ta........Lokesha (1 Reply)
Discussion started by: Lokesha
1 Replies

2. UNIX for Advanced & Expert Users

difficult sed command

Im trying to replace every line line1 line2 line3 with: line1 extraline1 line2 extraline2 line3 extraline3 with about 10 extra lines I am able to add axtra lines with: (17 Replies)
Discussion started by: Dave724001
17 Replies

3. UNIX for Dummies Questions & Answers

problem in filtering the file

-------------------------------------------------------------------------------- Hi, Plz help me out with this. I have some requirement like this..... I have a file like this... * CS sent email (11.20) CALYPSO 1031276 9076673 CDSHY FAILED Nov 19 2007 7:28AM OASYS: Unable to find CUSTOMER... (0 Replies)
Discussion started by: adityam
0 Replies

4. Shell Programming and Scripting

A difficult script (for me)

Hi, I'm a beginners, this is one of my first script, it's easy, but I don't know how to write this script: The script receive in input 4 parameters: 1) user_name 2) r and/or w and/or x ( rwx, rw, x, ....) 3) u and/or g and/or o ( u, uo, ugo, ...) 4) the path name The script print a... (2 Replies)
Discussion started by: DNAx86
2 Replies

5. UNIX for Dummies Questions & Answers

so difficult question about using grep

en...how to grep some words from some file, the goal is that, we donot want the words are exactly 9 charactor, and want to grep from some words that are longer than 9 and it contain a substring that with 9 different charactors (2 Replies)
Discussion started by: shrimpy
2 Replies

6. Shell Programming and Scripting

grep filtering problem

I'm working on writing a shell script that logs out whenever I have a firefox process running during certain times of the day (1 am - 8 am). I'll put it in crontab when it runs properly unless someone knows of a different and better way to do this. Here it is so far. if ps ax | grep... (4 Replies)
Discussion started by: cokedude
4 Replies

7. UNIX for Dummies Questions & Answers

difficult problem with function declaration

Hello, I have a problem with the declaration of a function. This is how I declare the function : c:63: void foo(threadpool *tp,void (*func)(void*), (void*)arg); Inside main, I call it like this: main(){ .......... threadpool y; c:104: ... (4 Replies)
Discussion started by: garag11
4 Replies

8. Shell Programming and Scripting

Difficult problem: Complex text file manipulation in bash script.

I don't know if this is a big issue or not, but I'm having difficulties. I apoligize for the upcoming essay :o. I'm writing a script, similar to a paint program that edits images, but in the form of ANSI block characters. The program so far is working. I managed to save the image into a file,... (14 Replies)
Discussion started by: tinman47
14 Replies

9. Programming

Difficult in analyzing an algorithm

Hello, I was reading Heuritics text and came across an algorithm below. Finding hard to analyze it can any one help me out below... How to analyze if I take say no. of types are 5 and each type has say 20 coins. thanks. Let {c1, c2...cn=1} be a set of distinct coin types where ci is... (1 Reply)
Discussion started by: sureshcisco
1 Replies

10. Linux

A little difficult: investigate Xenix and slattach problem

I know Xenix is a little outdated, and is dangerous to use on network. But this is a virtual machine, and I like to play retrocomputing sometime. The question is..why ftp over slip doesn't work? I've set this Xenix vm on libvirt <domain type='kvm' id='5'... (2 Replies)
Discussion started by: Linusolaradm1
2 Replies
GLBINDRENDERBUFFER(3G)						    OpenGL 3.3						    GLBINDRENDERBUFFER(3G)

NAME
glBindRenderbuffer - bind a renderbuffer to a renderbuffer target C SPECIFICATION
void glBindRenderbuffer(GLenum target, GLuint renderbuffer); PARAMETERS
target Specifies the renderbuffer target of the binding operation. target must be GL_RENDERBUFFER. renderbuffer Specifies the name of the renderbuffer object to bind. DESCRIPTION
glBindRenderbuffer binds the renderbuffer object with name renderbuffer to the renderbuffer target specified by target. target must be GL_RENDERBUFFER. renderbuffer is the name of a renderbuffer object previously returned from a call to glGenRenderbuffers(), or zero to break the existing binding of a renderbuffer object to target. ERRORS
GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER. GL_INVALID_OPERATION is generated if renderbuffer is not zero or the name of a renderbuffer previously returned from a call to glGenRenderbuffers(). SEE ALSO
glGenRenderbuffers(), glDeleteRenderbuffers(), glRenderbufferStorage(), glRenderbufferStorageMultisample(), glIsRenderbuffer() COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. OpenGL 3.3 03/08/2011 GLBINDRENDERBUFFER(3G)
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy