I have a file which contains the below details.. My requirement is to fetch all the lines which are starting with "ABC_XY_" into 1 file and rest of the lines (not starting with "ABC_XY_") into another file.
Could you please help with what command needs to be used?
file1.txt
----------
Expected o/p:
-------------------
Cheers,
Satya
Last edited by Franklin52; 10-10-2013 at 04:37 AM..
Reason: Please use code tags
Hi,
I am new to this forum and i would like to get help in this issue.
I have a file 1.txt as shown:
apple
banana
orange
apple
grapes
banana
orange
grapes
orange
....
Now i would like to search for pattern say apple or orange and then put a # at the beginning of the pattern... (2 Replies)
Hi,
I think you ppl did not get my question correctly, let me explain
I have 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:
... (1 Reply)
Hi all
I am searching for a pattern in a file .
The file content is in a single line.If am doing a grep or sed for the a particular pattern am getting whole file.
I want the result in different lines.
attaching the file for reference
search pattern "/xxxxxx/hhhh/tttttttt/sss/" and... (4 Replies)
Hi friends, I want to search for some hex error codes in some files.
After the hex error code is found, the occurences would be counted.
Afterwards the found hex errorcode would be cat into a separate file.
Here is my code:
#!/usr/bin/perl
use File::Basename;
my $find = $ARGV;
my... (2 Replies)
Hello guys,
I need your help for a specific sed command that would search for a multi line pattern and if found, would replace it by another multi line pattern.
For instance, here is the input:
<RefNickName>abcd</RefNickName>
<NickName>efgh</NickName>
<Customize>
... (0 Replies)
Hi All,
I am new to shell scripting and need help in scripting using CSH.
Here is what I am trying to so,
1. Search a specific string e.g. "task" from "task (input1, out1)".
2. Extract the arguements "input1" and "out1"
3. Add them in separate lines below. eg. "int input1" , " integer out1"
... (7 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Hi,
I want to search a pattern in a text file and remove another pattern in that file.
my text file look like this
0.000000 1.970000 F 303 -
1.970000 2.080000 VH VH +
2.080000 2.250000 VH VH +
2.250000 2.330000 VH L -
2.330000 2.360000 F H +
2.360000 2.410000 L VL -
2.410000 ... (6 Replies)
Hi All,
Greetings everyone !!!
I have a file which has many lines, out of which one line is as below.
I need to search for pattern "varchar(30) Select" and if exists, then split the line as below.
I am trying to achieve this in ksh. Can anyone help me on this. (8 Replies)
Discussion started by: Pradhikshan
8 Replies
LEARN ABOUT CENTOS
kate
KATE(1) KDE User's Manual KATE(1)NAME
kate - Advanced text editor for KDE
SYNOPSIS
kate [-s, --start name] [--startanon] [-n, --new] [-b, --block] [-p, --pid pid] [-e, --encoding name] [-l, --line line] [-c, --column
column] [-i, --stdin] [-u, --use] [KDE Generic Options] [Qt Generic Options]
DESCRIPTION
Kate is the KDE Advanced Text Editor.
Kate also provides the editor part for various applications, under the name KWrite.
Some of Kate's many features include configurable syntax highlighting for languages ranging from C and C++ to HTML to bash scripts, the
ability to create and maintain projects, a multiple document interface (MDI), and a self-contained terminal emulator.
But Kate is more than a programmer's editor. Its ability to open several files at once makes it ideal for editing UNIX(R)'s many
configuration files. This document was written in Kate.
OPTIONS -s, --start name
Start Kate with a given session.
--startanon
Start Kate with a new anonymous session, implies -n.
-n, --new
Force start of a new Kate instance (is ignored if start is used and another Kate instance already has the given session opened), forced
if no parameters and no URLs are given at all.
-b, --block
If using an already running Kate instance, block until it exits, if URLs given to open.
-p, --pid pid
Only try to reuse kate instance with this pid (is ignored if start is used and another Kate instance already has the given session
opened).
-e, --encoding name
Set encoding for the file to open
You can use this to force a file opened in utf-8 format, for instance. (The command iconv -l provides a list of encodings, which may be
helpful to you.)
-l, --line line
Navigate to this line
-c, --column column
Navigate to this column
-i, --stdin
Read the contents of stdin
-u, --use
Use an already running Kate instance; default, only for compatibility
SEE ALSO
More detailed user documentation is available from help:/kate (either enter this URL into Konqueror, or run khelpcenter help:/kate).
There is also further information available at the Kate website[1].
EXAMPLES
To open a file named source.cpp at column 15, line 25, in an existing Kate window, you could use:
kate -c 15 -l
25 -u source.cpp
If you have an active internet connection, you can take advantage of KDE's network transparency to open a file from an ftp site. If you do
not have write permission on the remote server, the file will be opened read only and you will be prompted for a local filename to save to
if you make changes. If you do have write permission, changes will be saved transparently over the network.
kate ftp://ftp.kde.org/pub/kde/README
AUTHORS
The maintainer of Kate is Christoph Cullmann<cullmann@kde.org>. A comprehensive list of authors and contributors is available in the
complete user manual mentioned above.
AUTHOR
Lauri Watts <lauri@kde.org>
Author.
NOTES
1. the Kate website
http://kate-editor.org/
K Desktop Environment 2010-10-06 KATE(1)