09-09-2010
Quote:
Originally Posted by
Scrutinizer
Nice and short, but that would also filter out the dot at the end of a sentence, no?
IMHO the OP wants words with a dot between 2 words, no?
Quote:
Originally Posted by
amicon007
I want to filter "word.word" pattern from it. I assume the pattern won't occur in start or end of the string.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file in which there are strings given below:
inode 1138932c(mqsiadm)
inode 1257904c(mqsiadm)
I want to get the nos. only form these.
The o/p should be
1138932
1257904
How to filter this out ?? (11 Replies)
Discussion started by: varungupta
11 Replies
2. UNIX for Advanced & Expert Users
Hi,
I am trying to filter the words from a file which contain 'abc'. But I am unable to. Could any one help me.
For eg: The file contents are
123ab 12hnj1 123abc456 123cgbcahjkf23 23134abchfhj43 gc32abc abc1 2abc3 sd uiguif fhwe 21242 uh123 jkcas124d123 u3hdbh23u ffsd8
Output... (3 Replies)
Discussion started by: venu_eie
3 Replies
3. Shell Programming and Scripting
Hi,
I have string like this (for example)
$str="orange AND grapes NOT pineapple";
$str="orange AND grapes NOT pineapple AND papaya";
$str="orange AND grapes NOT pineapple AND jackfruit NOT "fruit juice"";
I have to filter out NOT terms.
How can i do that?
I used this... (3 Replies)
Discussion started by: vanitham
3 Replies
4. Shell Programming and Scripting
Hi,
One of the scripts creates logs in the format:
progname_file1.log.20100312020657
where after file the number could be from 1 to 28 and after log. the date is attached in the format YYYYMMDDHHMISS
progname_file<1-28>.log.YYYYMMDDHHMISS.
Now I want to discard the .20100312020657... (7 Replies)
Discussion started by: dips_ag
7 Replies
5. Shell Programming and Scripting
Hi all,
I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line.
Let me paste an 2 examples:
anything before
any string begin
few lines of content
end1
anything after
anything before
any... (4 Replies)
Discussion started by: meuser
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a long log file. Out of which I want to filter particular occurrences where APC=4-033-0.
Please help how it can be done.
Input :
+++ ELEMENT 12-05-27 23:15:06 CC 3482 #040185 >
REPT APB TPE=C7NTL SM=22 OPC=4-003-7 APC=4-033-4 inaccessible
END OF REPORT #040185 ++-
... (7 Replies)
Discussion started by: vanand420
7 Replies
7. UNIX for Dummies Questions & Answers
well, im a total novice of unix commands and shell scripting, i never made anything.
But yesterday in my work i was working with a lot of log files and i was wondering if there is a command for doing something like this:
i have a bunch of files with text like this:
blablabla errorcode1... (11 Replies)
Discussion started by: matius_88
11 Replies
8. Shell Programming and Scripting
Hi folks,
I have a log file with the lines in the below format.
Jul 1 23:00:51 10.212.3.251 SS: %SYS-7-CLI_SCHEDULE: some error occured
I want to split the line based on the " %SYS-7-CLI_SCHEDULE: " value.
The criteria is the should store the word that starts with % i.e., ... (1 Reply)
Discussion started by: scriptscript
1 Replies
9. Shell Programming and Scripting
Hi
Can someone tell me which script will work best (in terms of speed and simplicity to write and run) for a large text file to filter all the lines with a minimum specified length of words ? A sample script with be definitely of great help !!! Thanks in advance. :) (4 Replies)
Discussion started by: my_Perl
4 Replies
10. Shell Programming and Scripting
My argument has data as below.
10.9.9.85
-rwxr-xr-x user1 2019-10-15 17:40 /app/scripts/testingscr5.scr 127869538
-rwxr-xr-x user1 2019-10-15 17:40 /app/scripts/testingscr56scr 127869538
....... (note all these between lines will start with hyphen '-' )
-rwxr-xr-x user1 2019-10-15 17:40... (3 Replies)
Discussion started by: mohtashims
3 Replies
LEARN ABOUT FREEBSD
expand
EXPAND(1) BSD General Commands Manual EXPAND(1)
NAME
expand, unexpand -- expand tabs to spaces, and vice versa
SYNOPSIS
expand [-t tab1,tab2,...,tabn] [file ...]
unexpand [-a | -t tab1,tab2,...,tabn] [file ...]
DESCRIPTION
The expand utility processes the named files or the standard input writing the standard output with tabs changed into blanks. Backspace
characters are preserved into the output and decrement the column count for tab calculations. The expand utility is useful for pre-process-
ing character files (before sorting, looking at specific columns, etc.) that contain tabs.
The unexpand utility puts tabs back into the data from the standard input or the named files and writes the result on the standard output.
The following options are available:
-a (unexpand only.) By default, only leading blanks and tabs are reconverted to maximal strings of tabs. If the -a option is given,
then tabs are inserted whenever they would compress the resultant file by replacing two or more characters.
-t tab1,tab2,...,tabn
Set tab stops at column positions tab1, tab2, ..., tabn. If only a single number is given, tab stops are set that number of column
positions apart instead of the default number of 8.
ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of expand and unexpand as described in environ(7).
EXIT STATUS
The expand and unexpand utilities exit 0 on success, and >0 if an error occurs.
STANDARDS
The expand and unexpand utilities conform to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
The expand command appeared in 3.0BSD.
BSD
October 13, 2006 BSD