Sponsored Content
Top Forums Shell Programming and Scripting awk script need to act on same file on matced case Post 302566080 by posix on Wednesday 19th of October 2011 11:37:47 AM
Old 10-19-2011
awk script need to act on same file on matced case

Hello,
I have a log file , i want to delete the lines of the log file which is match with 1st and 5th field with different patterns. Once it will meet with that condition it will delete that line from the log . I dont want to create any temp file over there.

Successfully able to retrieve the lines as
Code:
awk '$1~/222/ && $5~/abc/' test.txt

These output line need to be deleted from my log.

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

lower case to upper case string conversion in shell script

How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies

2. Shell Programming and Scripting

Clear Case, Awk and script

Hello. I should have asked this awhile ago but here is my situation. My task is to generate LOC for different directories. I have a text file that has dates in this format (01-Aug-2006). My task is to read each line and compare it to a branch date. Depending on the date, it should generate a... (0 Replies)
Discussion started by: mastachef
0 Replies

3. Shell Programming and Scripting

Script needed to select and delete lower case and mixed case records

HELLO ALL, URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE. FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY and the CITY column records will be: Newyork washington ... (1 Reply)
Discussion started by: abhilash mn
1 Replies

4. UNIX for Dummies Questions & Answers

Basic awk question...getting awk to act on $1 of the command itself

I have a script problem that I am not able to solve due my very limited understanding of unix/awk. This is the contents of test.sh awk '{print $1}' From the prompt if I enter: ./test.sh Hello World I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies

5. Shell Programming and Scripting

Script to Convert Upper case to Lower case

Hi All I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME However the Value in the DB is all in uppercase and contains the users first name and last name EG: > echo $NAME GRAHAM BOYLE > What I need is only the... (7 Replies)
Discussion started by: grahambo2005
7 Replies

6. UNIX for Dummies Questions & Answers

Shell script to rename or change file extension case.

I searched the forum, but there was different type of rename. Hello. I have files in folder. Like: xxxxxxxx1.html or xxxxxxxx2.txt or xxxxxxxx3.tar.gz and how to rename or change file extension case to xxxxxxxx1.htm or xxxxxxx2.TXT or (5 Replies)
Discussion started by: Sheldon
5 Replies

7. Shell Programming and Scripting

Bash script to process file without regard for case

Hello, I have a Bash script that processes a text file so that the existing file will look something like this: /www/repository/2010/201002231329532/LTLO_0407.pdf /www/repository/2010/201002231329532/LTLO_0507.pdf /www/repository/2010/201002231329532/LTLO_0607.pdf... (1 Reply)
Discussion started by: manouche
1 Replies

8. Shell Programming and Scripting

Case sensitive awk file split

Hello all, This is my first thread so please let me know if I am doing anything wrong or not following etiquette. I have an input file that looks like 123a12345 345a12445 245a66792 245A12345 215A23566 and I want output files that look like a.txt 123a12345 345a12445 245a66792 ... (7 Replies)
Discussion started by: monstrousturtle
7 Replies

9. Shell Programming and Scripting

To take two variables from a file and act as an input for the script

Hi, I have done the scripting such that it will read input line by line from a txt file and is passed through a script, but now my requirement is to pass two variables into a script from a file, how could I do this or is there any other better idea ? for reading singe input from a file, line... (4 Replies)
Discussion started by: ajothi
4 Replies

10. Shell Programming and Scripting

awk script to parse case with information in two fields of file

The below awk parser works for most data inputs, but I am having trouble with the last one. The problem is in the below rules steps 1 and 2 come from $2 (NC_000013.10:g.20763686_20763687delinsA) and steps 3 and 4 come from $1 (NM_004004.5:c.34_35delGGinsT). Parse Rules: The header is... (0 Replies)
Discussion started by: cmccabe
0 Replies
uulog(1)						      General Commands Manual							  uulog(1)

NAME
uulog - display entries in the UUCP log file. SYNOPSIS
uulog [-#] [-n lines] [-sf system] [-u user] [-DSF] [--lines lines] [--system system] [--user user] [--debuglog] [--statslog] [--follow] [--follow=system] DESCRIPTION
The uulog program can be used to display entries in the UUCP log file. It can select the entries for a particular system or a particular user. You can use it to see what has happened to your queued jobs in the past. Different options may be used to select which parts of the file to display. OPTIONS
-#, -n lines, --lines lines Here '#' is a number; e.g., `-10'. The specified number of lines is displayed from the end of the log file. The default is to dis- play the entire log file, unless the -f, -F, or --follow options are used, in which case the default is to display 10 lines. -s system, --system system Display only log entries pertaining to the specified system. -u, --user user Display only log entries pertaining to the specified user. -D --debuglog Display the debugging log file. -S, --statslog Display the statistics log file. -F, --follow Keep displaying the log file forever, printing new lines as they are appended to the log file. -f system, --follow=system Keep displaying the log file forever, displaying only log entries pertaining to the specified system. Standard UUCP options: -X type, --debug type Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. --debug option may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example, --debug 2 is equivalent to --debug abnormal,chat. -I file, --config Set configuration file to use. -v, --version Report version information and exit. --help Print a help message and exit. SEE ALSO
uucp(1) AUTHOR
Ian Lance Taylor <ian@airs.com>. Text for this Manpage comes from Taylor UUCP, version 1.07 Info documentation. Taylor UUCP 1.07 uulog(1)
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy