09-15-2003
Changing Special Characters Using Sed
Hi. Does anyone know how to use the sed command to change the special border characters on this .per file. I have to edit about 80 .per files. I need a sed script to change the below 3 and A characters.
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Test Islands, Office of Public Health -- WIC Computer Support System 1.0 ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ ³
³ C L I N I C M A I N M E N U ³
³ ³
³ 1 - Create/Update Patient 10 - Voucher Maintenance ³
³ 2 - WIC Case Maintenance 11 - Display Patient Events ³
³ 3 - WIC Case Data Sheet 12 - View Patient Medical Records ³
³ 4 - 13 - Written Manual Voucher Entry ³
³ 5 - Edit Patient Food Package 14 - WIC Case Inquiry ³
³ 6 - Record Patient Event/Sched 15 - Record Group Education Events ³
³ 7 - 16 - ³
³ 8 - Register Nutritional Ed 17 - Schedule Patients ³
³ 9 - Discharge Clients 18 - Show Family Relationships ³
³ ³
³ Q - Quit From System ³
³ ³
³ Enter Number of Selection: [a1] ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have this script that searches for a pattern.
However it fails if the pattern includes some
special characters. So far, it fails with the
following strings:
1. -Cr
2. $Mj
3. H'412
would a sed or awk be more effective?
i don't want the users to put the (\)
during the search (they... (5 Replies)
Discussion started by: apalex
5 Replies
2. Shell Programming and Scripting
Hi,
I am reading a file (GC_JAR.log) which has entries like:
511725.629, 0.1122672 secs]
525268.975, 0.1240036 secs]
527181.835, 0.2068215 secs]
527914.287, 0.2884801 secs]
528457.134, 0.2548725 secs]
I want to replace all the entries of "secs]" with just "secs"
Thus, the output... (4 Replies)
Discussion started by: itzz.me
4 Replies
3. Shell Programming and Scripting
I started with this:
counter1=1
cp file.txt file_${counter1}.tmp
while read name1
do
echo $name1
counter2=`expr $counter1 + 1`
sed /'${name1}'/d file_${counter1}.txt > file_${counter2}.txt
counter1=`expr $counter1 + 1`
done < source.txtsource.txt contains the... (1 Reply)
Discussion started by: lakanino
1 Replies
4. Shell Programming and Scripting
Hi everyone
I have file1 contains:
'7832'
' 8765
6543
I want a sed command that will format as:
'7832' , '8765' , '6543'
I tried
sed -e s/\'//g -e 's/^*//;s/*$//' file1 > file2
sed -e :a -e '$!N; s/\n/ /; ta' file2
which gives: 7832 8765 6543
I need some help to continue with... (5 Replies)
Discussion started by: nimo
5 Replies
5. Shell Programming and Scripting
Hello All
Seeking the right one SED command.
My attempt is:
From orginal.txt by SED to target.txt
sed -i "/('outbound-callerid/a\$ext->add($context, $exten, '', new ext_SipAddHeader('P-Preferred-Identity', '<sip:${CALLERID(nummer)}@carrier.com>'));" orginal.txtWhat am make wrong?:wall:
... (5 Replies)
Discussion started by: mdbinder
5 Replies
6. Shell Programming and Scripting
Need help in escaping special characters in sed command.
Here is the the string which i am trying to find a replace with
From :- REQUEST_TYPE=PIXEL&MSG_ID={//MESSAGE_ID}
To :- REQUEST_TYPE=PIXEL&MSG_ID= X_EDELIVERY_MESSAGE_ID & BATCH_ID= X_EDELIVERY_BATCH_ID
Here is the sed command i am... (2 Replies)
Discussion started by: aakishore
2 Replies
7. Shell Programming and Scripting
Hi I'm trying to replace string1 by string2 in file homepage.htm as follows but is not working. Please Help:
sedsed -i "s@'://your server name:port/test/owa'@'://11.22.33.44:5555/pls/SAMPLE'@g" homepage.htm
Where,
String1 ://your server name:port/test/owa
String2... (3 Replies)
Discussion started by: koazter
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file with this line, it's always in the first line:
I want to remove these special characters: ´╗┐
file1
´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35 Bytes;2 ;1
I want the same file to be only
\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35... (4 Replies)
Discussion started by: nakaedu
4 Replies
9. Shell Programming and Scripting
I am dusting off the sed cobwebs and had a basic question:
I have a file that contains:
$firewall = "on";
$cache = "on";
$dataset{'mary had a little lamb'} = "on";
and want to only change the contents of what is between the single quotes:
$dataset{'big bad wolf'} = "on";
I... (3 Replies)
Discussion started by: metallica1973
3 Replies
10. Shell Programming and Scripting
I have the foolowing data file:
File1
<p name="A">5004</p>
<p name="B">5004</p>
<p name="C">5004</p>
<p name="A">15004</p>
<p name="B">15004</p>
<p name="C">15004</p>
In a while loop using sed (100 of line need to be replace), I need the output to File3:... (2 Replies)
Discussion started by: bobo
2 Replies
LEARN ABOUT CENTOS
perf-trace
PERF-TRACE(1) perf Manual PERF-TRACE(1)
NAME
perf-trace - strace inspired tool
SYNOPSIS
perf trace
DESCRIPTION
This command will show the events associated with the target, initially syscalls, but other system events like pagefaults, task lifetime
events, scheduling events, etc.
Initially this is a live mode only tool, but eventually will work with perf.data files like the other tools, allowing a detached record
from analysis phases.
OPTIONS
-a, --all-cpus
System-wide collection from all CPUs.
-e, --expr
List of events to show, currently only syscall names. Prefixing with ! shows all syscalls but the ones specified. You may need to
escape it.
-o, --output=
Output file name.
-p, --pid=
Record events on existing process ID (comma separated list).
-t, --tid=
Record events on existing thread ID (comma separated list).
-u, --uid=
Record events in threads owned by uid. Name or number.
-v, --verbose=
Verbosity level.
-i, --no-inherit
Child tasks do not inherit counters.
-m, --mmap-pages=
Number of mmap data pages. Must be a power of two.
-C, --cpu
Collect samples only on the list of CPUs provided. Multiple CPUs can be provided as a comma-separated list with no space: 0,1. Ranges
of CPUs are specified with -: 0-2. In per-thread mode with inheritance mode on (default), Events are captured only when the thread
executes on the designated CPUs. Default is to monitor all CPUs.
--duration: Show only events that had a duration greater than N.M ms.
--sched: Accrue thread runtime and provide a summary at the end of the session.
-i --input Process events from a given perf data file.
SEE ALSO
perf-record(1), perf-script(1)
perf 06/30/2014 PERF-TRACE(1)