so difficult question about using grep


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers so difficult question about using grep
# 1  
Old 03-21-2008
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  
Old 03-21-2008
A really odd question... please give an example of the input file
# 3  
Old 03-22-2008
TO: jim mcnamara

forget about the question..

can you help me to do another thing.

given some word

how to get ride of the word that got some multiple charactor


suppose
input is:

abcdefg
abbdefg -----(this should be deleted)

and out put should be

abcdefg
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk related question (for loop) difficult scenario

VARA='hello|welcome|gone|fantastic|superb|nicecar' if VARA contains a pipe "|", i want the contents of VARA to be tranformed to: VARA="(hello) (welcome) (gone) (fantastic) (superb) (nicecar)" so that, when i echo the contents of $VARA like this: echo "$VARA" or like this: print... (8 Replies)
Discussion started by: SkySmart
8 Replies

2. 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

3. Shell Programming and Scripting

pls help kinda difficult question for a beginner

1. Create a directory script (project_dir.sh) · Write a script in your home directory to create a subdirectory called “PROJECT<99>” within your home directory on the Ubantu/Linux server. <99> is your project number (e.g. 01,02,03, ... 15). · The script must test whether... (1 Reply)
Discussion started by: bugenhagen_
1 Replies

4. 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

5. UNIX for Advanced & Expert Users

File alignment and performances... (difficult)

Hello ! I will use my best english possible to explain my objective. I'm french so pardon for the lack of precision... So, what i would like to do in shell script (but you will possibly answer ''not possible in script'' have to use low level langage or something like that) is described below.... (3 Replies)
Discussion started by: Gnaag
3 Replies

6. Shell Programming and Scripting

difficult nawk to understand

I found a command who prints x lines before and after a line who contain a searched string in a text file. The command is : nawk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r;print;c=a}b{r=$0}' b=2 a=4 s="string" file1 It works very well but I can't understand the syntax, too difficult with... (2 Replies)
Discussion started by: ahmad.diab
2 Replies

7. 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

8. 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

9. 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

10. UNIX for Advanced & Expert Users

Difficult Filtering Problem

Sir, I have a file containing say 1000 lines that contain 100 paragraphs of 10 lines each separated by blank lines.I have to match a pattern or a string "hdfhasdjkasdhs" and print the complete paragraphs containing these strings.I can do this with the help of line editor ex,but how can I use... (1 Reply)
Discussion started by: Piyush
1 Replies
Login or Register to Ask a Question