Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Hi All,
Below is my requirement. Whatever coming in between ' ', needs to delete.
Input File Contents:
==============
This is nice 'boy'
This 'is
bad
boy.' Got it
Expected Output
===========
This is nice
This
Got it (4 Replies)
Hi,
Before insert, delete everything. If ' available before insert, then we need to keep this.
Input:
====
l_s := ' INSERT INTO TEST1'
INSERT INTO TEST2
Output:
====
'INSERT INTO TEST'
INSERT INTO TEST2 (2 Replies)
Hi,
I have a data in a file like below -
andy 22 abc 30000 wallstreet
paul 30 xyz 40000 martstreet
john 35 abc 50000 martstreet
I want to search number of employees working in a particular company. Below query executes perfectly -
awk '/abc/{ COUNT ++; }END { print "number of... (3 Replies)
if the given pattern exists in the file with the very next line starting and ending
with the same pattern , delete the line that starts and ends with the given pattern.
So upon running on this file
=====================
hai people<PATTERN> we had
<PATTERN>a lot of fun<PATTERN>
... (1 Reply)
Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows.
header for file
1111
2222
3333
header for file
1111
2222
3333
header for file... (8 Replies)
I have a string in which i need to match a pattern and then i need to delete that line which contains that matching string.
The string is ..
This is the given string
//abc/def/IC.5.4.3/test/...
i need to match //abc
I am writing like this
sed '/^/\/\abc/d' but it is not giving me... (4 Replies)
I had a spot of trouble coming up with a title, hopefully you'll understand once you read my problem... :)
I have the output of an ldapsearch that looks like this:
dn: cn=sam,ou=company,o=com
uidNumber: 7174
gidNumber: 49563
homeDirectory: /home/sam
loginshell: /bin/bash
uid: sam... (2 Replies)
Hi Team,
Could someone please help me on this ..
While doing my day to day activity I use to delete manually the repeated ones ..
For example 05 & 06 are my hosts.. Now I need to print only 05 and 06, 05-06 is not required.
This is how I generate my report daily ..
DBG-STG1-05... (5 Replies)
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Discussion started by: Soham
21 Replies
LEARN ABOUT DEBIAN
colrm
COLRM(1) BSD General Commands Manual COLRM(1)NAME
colrm -- remove columns from a file
SYNOPSIS
colrm [start [stop]]
DESCRIPTION
The colrm utility removes selected columns from the lines of a file. A column is defined as a single character in a line. Input is read
from the standard input. Output is written to the standard output.
If only the start column is specified, columns numbered less than the start column will be written. If both start and stop columns are spec-
ified, columns numbered less than the start column or greater than the stop column will be written. Column numbering starts with one, not
zero.
Tab characters increment the column count to the next multiple of eight. Backspace characters decrement the column count by one.
ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of colrm as described in environ(7).
EXIT STATUS
The colrm utility exits 0 on success, and >0 if an error occurs.
SEE ALSO awk(1), column(1), cut(1), paste(1)HISTORY
The colrm command appeared in 3.0BSD.
BSD August 4, 2004 BSD