09-11-2008
cat in linux, file holding special charcters
Hi
I'd like to cat, in linux, a file that holds special charcters, like "-->" and ">" and "]"
For example I have a file named test123.txt
it looks like this:
2008-09-11 00:27:01,496 -
< 0 > --> Start calculation of pattern [PROCESS_complex3], Pattern was split to [1] pattern graphs
< 0 > System Tqls Optimizer going to ask System Tqls results for all graph's elements except [-13]
< 16 > System Tqls Optimizer got System tqls results for [-11]
< 16 > Entered OverallPatternGraphCalculator witks [2] ; -15(-11 --> -13) - container_f ; -19(-11 --> -17) - container_f] calculation size [0 consistent=true]
< 16 > Entered ComponentGraphCalculator with component [Num of nodes [3] ; -17 - process ; -13 - disk ; -11 - host Num of links [2] ; -15(-11 --> -13) - container_f ; -19(-11 --> -17) - container_f, elements size 0] calculation size [0 consistent=true]
< 16 > Entered CompositeCalcul [2] ; -15(-11 --> -13) - container_f ; -19(-11 --> -17) - container_f, elements size 0] calculation size [0 consistent=true]
< 7500 > Calculation ended, result size [1769 consistent=false]
< 7500 > Calculation ended, result size [1769 consistent=false]
< 7500 > Entered ConsistencyChe- process ; -13 - disk ; -11 - host Num of links [2] ; -15(-11 --> -13) - container_f ; -19(-11 --> -17) - container_f] calculation size [1769 consistent=false]
< 7500 > Consistency at pattern level was found to be required due to previous calculation inconsistency
< 7516 > Calculation ended, result size [1769 consistent=false]
< 7516 > Calculation ended, result size [1769 consistent=false]
< 7516 > Result size [1769]
I want to cat it, the result should be:
< 0 > --> Start calculation of pattern [PROCESS_complex3], Pattern was split to [1] pattern graphs
< 7516 > Result size [1769]
I tried varations of the following command:
cat test123.txt | grep "> --> Start calculation of pattern [" | grep "> Result size ["
I tried it with one '
and with \ before the special chars etc...
Any Ideas ?
Thanks
9 More Discussions You Might Find Interesting
1. Solaris
Dear All,
I have created a UTF-8 database to store multi-lingual charcters. Below is the query from which i insert from Winsql (front-end third party database browser tool), the data gets inserted properly.
insert into a (no, lbl)
values (1, "Cliquez ici pour revenir Ã_ la recherche de... (2 Replies)
Discussion started by: lloydnwo
2 Replies
2. UNIX for Advanced & Expert Users
How do i remove single quotes(') from a file.
Can we use sed for it (2 Replies)
Discussion started by: kris01752
2 Replies
3. UNIX for Advanced & Expert Users
I have a csv file with a record size of greater than 2048.So when i try to open the file in VI..This is the error i get (test.csv" A line cannot be longer than 2048 characters)
Is there a way i can change this parameter to read a bigger line (2 Replies)
Discussion started by: kris01752
2 Replies
4. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
5. UNIX for Advanced & Expert Users
I am trying to substitute a substring in a file and am having difficulty due to the presence of 'special characters'
I tried
sed -e "s/Bob's birthday 13/11/08 (today)/Bob's birthday 14/11/08 (tomorrow)/" file1
This does not action any change due to the square brackets.
How can I cater... (5 Replies)
Discussion started by: SAMZ
5 Replies
6. Shell Programming and Scripting
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies
7. UNIX for Dummies Questions & Answers
Find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA (0 Replies)
Discussion started by: Phaneendra G
0 Replies
8. Homework & Coursework Questions
find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA (1 Reply)
Discussion started by: Phaneendra G
1 Replies
9. Linux
I have a .CSV file when I check for the special characters in the file using the command cat -vet filename.csv, i get very lengthy lines with "^@", "^I^@" and "^@^M" characters in between each alphabet in all of the records. Using the code below file filename.csv I get the output as
I have a... (2 Replies)
Discussion started by: dhruuv369
2 Replies
LEARN ABOUT MOJAVE
fc-pattern
FC-PATTERN(1) FC-PATTERN(1)
NAME
fc-pattern - parse and show pattern
SYNOPSIS
fc-pattern [ -cdVh ] [ --config ] [ --default ] [ [ -f format ] [ --format format ] ] [ --version ] [ --help ]
[ pattern [ element... ] ]
DESCRIPTION
fc-pattern parses pattern (empty pattern by default) and shows the parsed result. If --config is given, config substitution is performed
on the pattern before being displayed. If --default is given, default substitution is performed on the pattern before being displayed.
If any elements are specified, only those are printed.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-c Perform config substitution on pattern.
-d Perform default substitution on pattern.
-f Format output according to the format specifier format.
-V Show version of the program and exit.
-h Show summary of options.
pattern
Parses and displays pattern (uses empty pattern by default).
element
If set, the element property is displayed for parsed pattern.
SEE ALSO
FcNameParse(3) FcConfigSubstitute(3) FcDefaultSubstitute(3) FcPatternPrint(3) FcPatternFormat(3) fc-cat(1) fc-cache(1) fc-list(1) fc-
match(1) fc-query(1) fc-scan(1)
The fontconfig user's guide, in HTML format: /usr/share/doc/fontconfig/fontconfig-user.html.
AUTHOR
This manual page was updated by Behdad Esfahbod <behdad@behdad.org>.
Apr 20, 2010 FC-PATTERN(1)