Sponsored Content
Top Forums Shell Programming and Scripting removing a particular field from some of the lines in a filed Post 302717357 by dev.devil.1983 on Thursday 18th of October 2012 04:49:42 AM
Old 10-18-2012
removing a particular field from some of the lines in a filed

Hi All,

i have a file having multiple lines but mainly constitues of following two types

Code:
1) Sat,Oct,1,01:04:51,2011,Local,ESSBASE0,Info(1051037),Logging,out,user,210073155,,,active,for,63,minutes,GETS_SAL,loaded

Code:
2) Thu,Sep,20,13:08:52,2012,Local,ESSBASE0,50,Info(1051037),Logging,out,user,hypadmin,,,active,for,0,minutes,Application,GETS_GL


need to bring all the lines in the same format by removing the field '50'(highlighted in red) from the lines containing it. this filed mainly contains 2 digit numbers and can be values other than 50.

Thanks in advance Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

removing last field of the line

I have a text file containing /database/sp/NTR_Vlr_Upload.sql /database/tables/StatsTables.sql /mib/ntr.mib /mib/ntr.v2.mib /scripts/operations/ntr/IMSITracer.ph i want the last field after "/" removed like /database/sp/ /database/tables/ /mib/ /mib/ ... (4 Replies)
Discussion started by: adddy
4 Replies

2. Shell Programming and Scripting

Removing parts of a specific field

All, I have a field in a comma seperated file with hundreds of lines and about 20 columns and I wish to remove all numbers after the decimal point in field 4 on each line and output the rest to another file or write it back to itself. File is like this 20070126, 123.0, GBP, 1234.5678,... (9 Replies)
Discussion started by: kieranh
9 Replies

3. Shell Programming and Scripting

Removing empty lines(space) between two lines containing strings

Hi, Please provide shell script to Remove empty lines(space) between two lines containing strings in a file. Input File : A1/EXT "BAP_BSC6/07B/00" 844 090602 1605 RXOCF-465 PDTR11 1 SITE ON BATTERY A2/EXT... (3 Replies)
Discussion started by: sudhakaryadav
3 Replies

4. UNIX for Dummies Questions & Answers

Removing spaces in the second field alone

Consider my input string as "abc|b f g|bj gy" I am expecting the output as "abc|bfg|bj gy". Please let me know how to achieve this in unix? Thanks (8 Replies)
Discussion started by: pandeesh
8 Replies

5. Shell Programming and Scripting

Replace first field of a line with previous filed of the line

Hi Everyone, I have a file as below: IM2345638,sherfvf,usha,30 IM384940374,deiufbd,usha,30 IM323763822,cdejdkdnbds,theju,15 0,dhejdncbfd,us,20 IM398202038,dhekjdkdld,tj,30 0,foifsjd,u2,40 The output i need is as below IM2345638,sherfvf,usha,30... (4 Replies)
Discussion started by: usha rao
4 Replies

6. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies

7. Shell Programming and Scripting

Replacing first field of file2 with the second filed of file1 for matching cases

Dear All, Need your help..:D I am not regular on shell scripts..:( I have 2 files.. Content of file1 cellRef 4};"4038_2_MTNL_KALAMBOLI" cellRef 1020};"4112_3_RAINBOW_BLDG" cellRef 134};"4049_2_TATA_HOSPITAL" cellRef 1003};"4242_3_HITESH_CONSTRUCTION" cellRef... (6 Replies)
Discussion started by: ailnilanjan
6 Replies

8. Shell Programming and Scripting

Joining broken lines and removing empty lines

Hi - I have req to join broken lines and remove empty lines but should NOT be in one line. It has to be as is line by line. The challenge here is there is no end of line/start of line char. thanks in advance Source:- 2003-04-34024|04-10-2003|Claims|Claim|01-13-2003|Air Bag:Driver;... (7 Replies)
Discussion started by: Jackceasar123
7 Replies

9. Shell Programming and Scripting

awk repeat one field at all lines and modify field repetitions

Hello experts I have a file with paragraphs begining with a keeping date and ending with "END": 20120301 num num John num num A keepnum1 num num kathrin num num A keepnum1 num num kathrin num num B keepnum2 num num Pete num num A keepnum1 num num Jacob num... (2 Replies)
Discussion started by: phaethon
2 Replies
curs_scroll(3X) 														   curs_scroll(3X)

NAME
scroll, scrl, wscrl - scroll a curses window SYNOPSIS
#include <curses.h> int scroll(WINDOW *win); int scrl(int n); int wscrl(WINDOW *win, int n); DESCRIPTION
The scroll routine scrolls the window up one line. This involves moving the lines in the window data structure. As an optimization, if the scrolling region of the window is the entire screen, the physical screen may be scrolled at the same time. For positive n, the scrl and wscrl routines scroll the window up n lines (line i+n becomes i); otherwise scroll the window down n lines. This involves moving the lines in the window character image structure. The current cursor position is not changed. For these functions to work, scrolling must be enabled via scrollok. RETURN VALUE
These routines return ERR upon failure, and OK (SVr4 only specifies "an integer value other than ERR") upon successful completion. NOTES
Note that scrl and scroll may be macros. The SVr4 documentation says that the optimization of physically scrolling immediately if the scroll region is the entire screen "is" per- formed, not "may be" performed. This implementation deliberately does not guarantee that this will occur, to leave open the possibility of smarter optimization of multiple scroll actions on the next update. Neither the SVr4 nor the XSI documentation specify whether the current attribute or current color-pair of blanks generated by the scroll function is zeroed. Under this implementation it is. PORTABILITY
The XSI Curses standard, Issue 4 describes these functions. SEE ALSO
curses(3X), curs_outopts(3X) curs_scroll(3X)
All times are GMT -4. The time now is 02:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy