Sponsored Content
Top Forums Shell Programming and Scripting filter the string from a file ?? Post 302136332 by vino on Monday 17th of September 2007 06:44:29 AM
Old 09-17-2007
Perhaps,
Code:
[~]$ 
echo "inode 1138932c(mqsiadm)
inode 1257904c(mqsiadm)" | tr -dc "[:digit:]\n"
1138932
1257904
[~]$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File filter

Hi Everyone , have a nice i would need a little help on this i have file which contains blocks such as given below <hgsdp:msisdn=923228719047,loc; HLR SUBSCRIBER DATA SUBSCRIBER IDENTITY MSISDN IMSI STATE AUTHD 923228719047 410072110070614 CONNECTED ... (3 Replies)
Discussion started by: Dastard
3 Replies

2. Shell Programming and Scripting

Sed filter words from string

I have following string in a variable: str="sstring garbage adfsdf tab.col1 lkad rjfj tab2.col2 adja tab2.col4 garbage" I want to filter "word.word" pattern from it. I assume the pattern won't occur in start or end of the string. Output shoud be: tab.col1 tab2.col2 tab2.col4 Can this be... (7 Replies)
Discussion started by: amicon007
7 Replies

3. Shell Programming and Scripting

Filter a .kml file (xml) with data set from text file

I have a .kml file. So I want filter the .kml to get only the tags that have this numeric codes that they are in a text file 11951 11952 74014 11964 11965 11969 11970 11971 11972 60149 74018 74023 86378 11976 11980 11983 11984 11987 (5 Replies)
Discussion started by: pcoj33
5 Replies

4. UNIX for Dummies Questions & Answers

Filter a particular string

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

5. UNIX for Dummies Questions & Answers

Help me to filter a file

I want to view a file ignoring mutilple comment line (/*....*/). Please help me on this. Advance thanks.:b: (5 Replies)
Discussion started by: Pradipta Kumar
5 Replies

6. Shell Programming and Scripting

Perl script to filter the string

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

7. Shell Programming and Scripting

Shell Script (ksh) - SQLPlus query filter using a string variable

Using ksh, I am using SQLPlus to execute a query with a filter using a string variable. REPO_DB=DEV1 FOLDER_NM='U_nmalencia' FOLDER_CHECK=$(sqlplus -s /nolog <<EOF CONNECT user/pswd_select@${REPO_DB} set echo off heading off feedback off select subj_name from subject where... (5 Replies)
Discussion started by: nkm0brm
5 Replies

8. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies

9. Shell Programming and Scripting

Shell script to filter records in a zip file that contains matching columns from another file

Not sure if this is the correct forum for this question. I have two files. file1.zip, file2 Input: file1.zip col1, col2 , col3 a , b , 0:0:0:0:0:c436:9346:d40b x, y, 0:0:0:0:0:880:39f9:c9a7 m, n , 0:0:0:0:0:80c7:9161:fe00 file2.txt col1 c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies

10. Shell Programming and Scripting

Need to filter string between specific string in ksh

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
smfi_register(3N)														 smfi_register(3N)

NAME
smfi_register() - registers a set of filter callbacks for sendmail SYNOPSIS
PAMAMETERS
descr Specifies a filter descriptor of type describing the filter's functions. DESCRIPTION
The creates a filter using the information given in the smfiDesc argument. must be called before the routine. Multiple calls to the rou- tine within a single process is not allowed. The structure has the following members: A NULL value for any callback function indicates that the filter does not wish to process the given type of information and the filter returns the value. Notes The flags field must contain the bitwise OR of 0 (zero) or more of the following values: This filter adds headers. This filter changes and deletes headers. This filter replaces the body of the message during the filtering process. may have significant performance impact if other filters do body filtering after This filter adds recipients to the message. This filter removes recipients from the message. RETURN VALUE
The routine may return for any of the following reasons: o Memory allocation failure o Incompatible version or illegal flags value AUTHOR
was developed by the Sendmail Inc. SEE ASLO
smfi_main(3N), smfi_setconn(3N), smfi_settimeout(3N), smfi_opensocket(3N), smfi_setbacklog(3N), smfi_setdbg(3N), smfi_stop(3N). on smfi_register(3N)
All times are GMT -4. The time now is 04:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy