Sponsored Content
Top Forums Shell Programming and Scripting Specific string parsing in Linux/UNIX Post 302901344 by balajesuri on Tuesday 13th of May 2014 12:18:49 PM
Old 05-13-2014
Code:
[user@host ~]$ echo "String1=01234 String2=56546 String3=24356 Satish=1234 String4=2345" | sed 's/.*Satish=\([0-9]*\).*/\1/'
1234
[user@host ~]$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing string using specific delimiter

Hi, I'm wondering what is the best way to parse out a long string that has a specific deliminator and outputting each token between the delim on a newline? i.e. input text1,text2,text3,tex4 i.e. output text1 text2 text3 text4 (8 Replies)
Discussion started by: primp
8 Replies

2. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

3. Shell Programming and Scripting

using sed to replace a specific string on a specific line number using variables

using sed to replace a specific string on a specific line number using variables this is where i am at grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies

4. Shell Programming and Scripting

parsing filename and grabbing specific string patterns

Hi guys...Wow I just composed a huge post and it got erased as I was logged out automatically Anyways I hope someone can help me out here. So the task I'm working on is like this I have a bunch of files that I care about sitting in a directory say $HOME/files Now my job is to go and loop... (6 Replies)
Discussion started by: rukasetsuna
6 Replies

5. Shell Programming and Scripting

Html parsing - get line after specific string till a point

Hi all :) It sounds complex, for example I want to find the whole html file (there are 5 entries of this string and I need to get all of them) for the string "<td class="contentheading" width="100%">", get the next line from it only till the point that says "</td>", plus removing \t (tabs) ... (6 Replies)
Discussion started by: hakermania
6 Replies

6. Shell Programming and Scripting

Parsing a long string string problem for procmail

Hi everyone, I am working on fetchmail + procmail to filter mails and I am having problem with parsing a long line in the body of the email. Could anyone help me construct a reg exp for this string below. It needs to match exactly as this string. GetRyt... (4 Replies)
Discussion started by: cwiggler
4 Replies

7. Shell Programming and Scripting

string parsing using UNIX

I got multple sql files.such as >>vi abc.sql select A.SITENAME, NULL NULL A.CREATE_DTM NULL A.MODIFY_DTM NULL FROM ${STG_RET_ITEM} A INNER JOIN ${STG_INC_COMP} B ON (A.CUSTID=B.CUSTID) LEFT OUTER JOIN ( select C.SITEID,SITESTATUS,MIN_EFF_DT,CURR_ST_DT,MAX_IN_DT,MAX_ACT_DT from... (4 Replies)
Discussion started by: ali123
4 Replies

8. UNIX for Dummies Questions & Answers

Delete Unix/Linux file at a specific time in future.

Hi, I was wondering if there is a command to delete a file in the future. For example: If I create a file named unix.lst using the vi editor, but after I create it, what command will be suitable to delete "unix" files from the system at 13:40 military time with no log file. I was going to... (3 Replies)
Discussion started by: abhi7514
3 Replies

9. UNIX for Beginners Questions & Answers

Get string before specific word in UNIX

Hi All, I'm writing unix shell script and I have these files. I need to get name before _DETL.tmp. ABC_AAA_DETL.tmp ABC_BBB_DETL.tmp ABC_CCC_DETL.tmp PQR_DETL.tmp DEF_DETL.tmp JKL_DETL.tmp YUI_DETL.tmp TG_NM_DDD_DETL.tmp TG_NM_EEE_DETL.tmp GHJ_DETL.tmp RTY_DETL.tmp output will... (3 Replies)
Discussion started by: ace_friends22
3 Replies

10. Shell Programming and Scripting

String parsing help across multiple UNIX platforms

Need to parse XML like strings from a file. Using `egrep -A 1 "Panel Temp" "$2" | tail -2` I get the following string: <parameter name="Panel Temp" unit="0.1 C"> <value size="1" starttime="06-08-2017 09:36:56.968">95</value> I want to output: {"Panel Temp" 9.5 C} The 9.5 C is the value... (16 Replies)
Discussion started by: harleyvrodred
16 Replies
rlm_attr_rewrite(5)						 FreeRADIUS Module					       rlm_attr_rewrite(5)

NAME
rlm_attr_rewrite - FreeRADIUS Module DESCRIPTION
The rlm_attr_rewrite module provides functionality to rewrite data in radius packets on the fly. This can be useful in authorization and accounting functions. The main configuration items to be aware of are: attribute The name of the attribute that you want to be rewritten searchfor String to be replaced. searchin Where to look for the attribute. Valid values are: packet, reply, proxy, proxy_reply, config replacewith String to replace "searchfor". append Set to yes or no. If set to yes then the replace string will be appended to the original string. ignore_case Set to yes or no. Determines whether search will be case insensitive or case sensitive. new_attribute Set to yes or no. If set to yes, then new attribute will be created with values from "searchin" and "replacewith". Other options will be ignored. max_matches Set the max number of attributes to match against. This is useful if you need to rewrite the value in multiple Vendor Specific Attributes. SECTIONS
authorization, authentication, postauthentication, preaccounting, accounting, preproxy, postproxy FILES
/etc/raddb/radiusd.conf SEE ALSO
radiusd(8), radiusd.conf(5) AUTHOR
Chris Parker, cparker@segv.org 3 February 2004 rlm_attr_rewrite(5)
All times are GMT -4. The time now is 06:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy