Sponsored Content
Full Discussion: Need to remove the words
Top Forums Shell Programming and Scripting Need to remove the words Post 302339241 by jim mcnamara on Thursday 30th of July 2009 05:52:59 AM
Old 07-30-2009
If all lines in the file match your example:
Code:
awk '{print $3}' filename > newfilename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove first few words from a line

Hi All, Sample: 4051 Oct 4 10:03:36 AM 2008: TEST: end of testcase Checking Interface after reload, result fail I need to remove first 10 words of the above line and output should be like Checking Interface after reload, result fail Please help me in this regard. Thanks, (4 Replies)
Discussion started by: shellscripter
4 Replies

2. UNIX for Advanced & Expert Users

Remove words from file

Hello, I have a question: I have two different files, let's call them file1 and file2. file1 contains a list of words, the words are on seperate lines: word1 word2 word3 word4 etc... file2 also contains a list of words, seperated in the same way as file1. What I want to do is... (5 Replies)
Discussion started by: Beeser
5 Replies

3. Shell Programming and Scripting

Remove the first two words from shell arguments

Hi I need to delete first two words from the arguments my script receives .. no matter how many arguments are passed . Thanks Praveen (5 Replies)
Discussion started by: praveenbvarrier
5 Replies

4. Shell Programming and Scripting

Remove all words after first space from each line

My file looks like: asd absjdd sdff vczxs wedssx c dasx ccc I need to keep asd sdff wedssx dasx How do I do that experts?:wall::wall: (1 Reply)
Discussion started by: hakermania
1 Replies

5. Shell Programming and Scripting

remove words

All, I have a file with below entries. /java/usr/abc/123 /java/usr/xyz/123_21 /java/usr/ab12/345/234 ......... ......... And I need entry as /java/usr/abc/config /java/usr/xyz/config /java/usr/ab12/config ......... ......... Actually, I need to remove all other entries... (2 Replies)
Discussion started by: anshu ranjan
2 Replies

6. Shell Programming and Scripting

How to remove words that contain 3+ of the same character in a row?

Hello, I am looking for a way to remove words from a list that contain 3 or more of the same character. For example lets say the full list is as follows ABCDEF ABBHJK AAAHJD KKPPPP NAUJKS AAAHJD & KKPPPP should be removed from this list as obviously they contain AAA and PPPP... (7 Replies)
Discussion started by: colinireland
7 Replies

7. Shell Programming and Scripting

Remove spaces from between words that are in a field

Hi all, Is there a sed/awk cmd that will remove blank space from between words in a particular field, replacing with a single space? Field containing 'E's in the example below: Example input file: AAAAA AA|BBBB|CCCCCCC|DDDDDD |EEEE EEEEEE| FFF FFFFF| ... (6 Replies)
Discussion started by: dendright
6 Replies

8. Shell Programming and Scripting

Remove last few words from Line

Hi I would like to remove last few words from File Could anybody Help on it. ps -ef | grep mgr.prm | awk '{print $10}' /opt/app/dummyd/xyz/dirprm/mgr.prm /opt/app/dummy/xyz/dirprm/mgr.prm /opt/app/dummy/xyz/dirprm/mgr.prm I want output like /opt/app/dummyd/xyz... (4 Replies)
Discussion started by: tapia
4 Replies

9. UNIX for Dummies Questions & Answers

Remove duplicate words from column 1

Tried using sed and uniq but it's removing the entire line. Can't seem to figure a way to just remove the word. Any help is appreciated. I have a file: dog, text1, text2, text3 dog, text1, text2, text3 dog, text1, text2, text3 cat, text1, text2, text3 Trying to remove all duplicate instances... (6 Replies)
Discussion started by: jimmyf
6 Replies

10. Shell Programming and Scripting

Remove repeated letter words

Hi, I have this text file with these words and I need help with removing words with repeated letter from these lines. 1 ama 5 bib 29 bob 2 bub 5 civic 2 dad 10 deed 1 denned 335 did 1 eeee 1 eeeee 2 eke 8... (4 Replies)
Discussion started by: crepe6
4 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy