Sponsored Content
Top Forums Shell Programming and Scripting How to replace the last pattern using sed? Post 302508864 by vistastar on Tuesday 29th of March 2011 10:05:30 AM
Old 03-29-2011
don't use the eee after AAA,because it may not be eee.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find a pattern and replace using sed.

Hi I need to help on finding the below pattern using sed <b><a href="/home/document.do?assetkey=x-y-abcde-1&searchclause=photo"> and replace as below in the same line on the index file. <b><a href="/abcde.html"> thx in advance. Mari (5 Replies)
Discussion started by: maridhasan
5 Replies

2. Shell Programming and Scripting

SED Search Pattern and Replace with the Pattern

Hello All, I have a string "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031", and I just want to extract LLSV1, but I dont get the expected result when using the sed command below. # echo "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031" | awk '{print... (4 Replies)
Discussion started by: racbern
4 Replies

3. Shell Programming and Scripting

Pattern Replace using sed or awk

Hi , My file have data like 4:ALMOST NEVER PR 1925836 5:NEVER PR W DDA 5857610 6:NEVER PR WO DDA 26770205 but i want to replace the spaces before last numric digits out put should be like this 4:ALMOST NEVER PR=1925836 5:NEVER PR W DDA=5857610 6:NEVER PR WO... (7 Replies)
Discussion started by: max_hammer
7 Replies

4. Shell Programming and Scripting

Replace everything but pattern in a line using sed

I have a file with multiple lines like this: <junk><PATTERN><junk><PATTERN><junk> <junk><PATTERN><junk><PATTERN><junk><PATTERN><junk> Note that 1. There might be variable number occurrences of PATTERN in a line. 2. <> are just placeholders, they do not form part of the pattern. I need... (4 Replies)
Discussion started by: flatley
4 Replies

5. Shell Programming and Scripting

sed to replace pattern with filename

Hi all, I'm trying to replace a pattern/string in about 100 files with the filename using following commands but getting nowhere: for f in *.fa; do sed "s/^>.*/>$f/g" $f > $f_v1.fa; done for f in *.fa; do sed 's/^>.*/>`echo $f`/' > $fa_v1.fa; done Basically I want to change any line... (5 Replies)
Discussion started by: ivpz
5 Replies

6. Shell Programming and Scripting

sed command to replace two character pattern with another pattern

Not able to paste my content. Please see the attachment :-( (2 Replies)
Discussion started by: vivek d r
2 Replies

7. Shell Programming and Scripting

sed find/replace a pattern, but not this one..

I've got a file like so: ...lots of lines, etc. push "route 10.8.0.0 255.255.255.0" push "route 192.168.1.123 255.255.255.0" ...lots of lines, etc. I want to sed find/replace the IP address in the second line, whatever it is, with a new IP address, but I don't want to touch the first line.... (5 Replies)
Discussion started by: DaHai
5 Replies

8. Shell Programming and Scripting

sed - Search and replace within pattern

Hi Guys! Unix newbie here! Have a requirement for which I have been scouting the forums for a solution but has been out of luck so far :( I have a file which contains the following:- TEST1|TEST2|"TEST3|1@!2"|TEST5 My sed command should result in either one the following output:-... (6 Replies)
Discussion started by: hishamzz
6 Replies

9. UNIX for Beginners Questions & Answers

sed replace pattern

I have a file with multiple lines, all in the same format. For each line, I need to replace the sequence of digits after the last : with a new value, but keep the single quote at the end of the line. Example: Input: ( two lines of file) Name: 'text1:200/text2:1.2.3.4' Name2:... (19 Replies)
Discussion started by: Beginner101
19 Replies

10. UNIX for Beginners Questions & Answers

Find pattern and replace using sed

Hi, i want to replace the following lines in such a way that if the word merge exists in first column it must replace the 3rd column as M and if parse exists in first column then the last column must P, if neither it must mark it as X. I have tried the solution using awk, but it is saying... (6 Replies)
Discussion started by: charlie87
6 Replies
APRSMON(8)						     Linux Programmer's Manual							APRSMON(8)

NAME
aprsmon - monitor APRS AX.25 traffic for javAPRS SYNOPSIS
aprsmon [-a] [-m] [-r] [-k minutes] [-p port] [-t title] [-i infofile] DESCRIPTION
Aprsmon uses SOCK_PACKET facilities to provide a network monitor of all AX.25 UI text traffic heard by the system. It is based on lis- ten(1). Aprsmon collects (-m) or displays standard AX.25 UI text frames in a format similar to that output by a standard TNC in "Monitor ON" mode and is intended to be used with programs like javAPRS which wish to see a TNC data stream over a TCP connection. When the aprsmon master has been running for a while and a new aprsmon slave starts up, first all saved up reports are sent, then a title line indicating the beginning of live data is sent, and new reports are sent as received. Compressed position and telemetry reports as generated by the APRS Mic Encoder are translated into the conventional uncompressed APRS Micro-Interface-Module (MIM) telemtry format so that these stations are visible in javAPRS. Reports containing a TheNet X1J4 beacon header are also edited to strip off the header making these nodes visible in javAPRS as well. OPTIONS
-a Allow for the monitoring of outgoing frames as well as incoming ones. -r Choose "raw" mode which allows non-printable data through. -p port Monitor only those frames received on a particular port, by default all AX.25 interfaces are monitored. -m "Master" mode. Retain monitored data for the number of minutes specified with the -k option in a shared memory segment. -k minutes Retain monitored packets going back the given number of minutes. Default is 30. -t title Sets the javAPRS title string. Default is "Live data from Linux." -i infofile Infofile is the path to the file that the aprsmon master writes the shared memory segment and semaphore id's into. Default is "/var/ax25/aprsmon.info." javAPRS CONFIGURATION Set up one aprsmon master running on your system to collect historical data going back a while. You will probably want to set up an /etc/rc.d/init.d script for this. aprsmon -a -m& Add an entry into /etc/services with the port number you want javAPRS to connect on. For example: aprs 14439/tcp # APRS monitor on 144.39 Add an entry into /etc/inetd.conf for this service: aprs stream tcp nowait root /usr/sbin/aprsmon aprsmon -a To test, simply "telnet localhost aprs". To use with javAPRS, set, for example, <PARAM name = "dataFile1" value = "netc:14439:localhost"> in your HTML file as described in the javAPRS documentation, and then use appletviewer to run javAPRS: appletviewer mydemo.html Mic-E to MIM Translation The Mic-E reduces the duration of packet noise on a voice frequency by encoding its data in a compressed form, some of which is binary. Some APRS-decoding software, notably javAPRS, is unable to deal with this data. To solve this problem aprsmon expands the Mic-E packet into one or two MIM packets as follows: @ddhhmmzDDMM.hhN/DDDMM.hhW$cse/spd/E>mon/Mm/status T#MIC,aaabbbcccdddeeefffComments ddhhmm is the UTC day and time the packet was received by the host running aprsmon. DDMM.hhN is the latitude. / is the symbol table selection (/ or ). DDDMM.hhW is the longitude. $ is the symbol. cse,spd are course and speed. E is the type of Mic-Encoder: E - TAPR Mic-Encoder T - Kenwood TH-D7 m is the status message number, and status is the status message number expanded as follows: 0 - Off duty.. 1 - Enroute... 2 - In Service 3 - Returning. 4 - Committed. 5 - Special... 6 - PRIORITY.. 7 - EMERGENCY. aaa,bbb,ccc,ddd,eee,fff are the values of the telemetry channels. FILES
/etc/ax25/axports /var/ax25/aprsmon.info SEE ALSO
call(1), listen(1), beacon(1), ax25(4), axattach(8), http://www.bridge.net/~sdimse/javAPRS.html, http://www.tapr.org, http://www.aprs.net, MIC-E.TXT,TELEMTRY.TXT,PROTOCOL.TXT AUTHOR
Alan Crosswell, n2ygk@weca.org Linux 9 February 1999 APRSMON(8)
All times are GMT -4. The time now is 07:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy