03-11-2010
Hi anbu23,
Thanks for quick reply..so this will check for the string only in the 6, 7, 8, 9 positions only right..and it should not check any other positions of every records of the file..
sed "s/^\(.\{5\}\)2D3M/\12A3M/" file
what does 1 mean before 2A3M in the above SED command.
Pls respond..thanks..
Last edited by techmoris; 03-11-2010 at 06:24 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a process a.out that runs from /a and /b
How can I get the pid of the one running from /a
ps -C /a/a.out
does not work
Thanks! (4 Replies)
Discussion started by: JCR
4 Replies
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
Hi All ,
I have different strings (SQL queries infact) of different lengths such as:
1. "SELECT XYZ FROM ABC WHERE ABC.DEF='123' "
2. "DELETE FROM ABC WHERE ABC.DEF='567'"
3. "SELECT * FROM ABC"
I need to find out the word coming after the... (1 Reply)
Discussion started by: swapnil.nawale
1 Replies
4. Shell Programming and Scripting
Hi,
I have a to modify a line and insert a keyword in the middle to a specific location.
My line looks like this
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (ABC, DEF, GHI)
I want to change it as
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING... (4 Replies)
Discussion started by: mwrg
4 Replies
5. Shell Programming and Scripting
Hi,
I got long list of reference file (column one is refer to the header in input file; column 2 is info of start position in input file; column 3 is info of end position in input file;) shown as below:
read_2 10 15
read_3 5 8
read_1 4 10
.
.
.
Input file (huge file with total... (6 Replies)
Discussion started by: perl_beginner
6 Replies
6. Shell Programming and Scripting
I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work.
Brief overview:
I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies
7. Shell Programming and Scripting
Hello All,
I have a comma separated file which needs to be loaded to the database. But, I need to trim the white spaces for a specific column before its loaded.
Below is the sample line from the input file:
690,690,0575,"01011940","01011940", , , , , ,36720,36722,V2020,V2999,... (6 Replies)
Discussion started by: Praveenkulkarni
6 Replies
8. Shell Programming and Scripting
I'm try to change a the prohibit to aix for the lines starting with ssh and emagent and rest should be the same. Can anyone please suggest me how to do that using a shell script or sed
passwd account required /usr/lib/security/pam_prohibit
passwd session required ... (13 Replies)
Discussion started by: pjeedu2247
13 Replies
9. Shell Programming and Scripting
Hi friends,
I have one XML file having below structure :-
INput XML file :-
<?xml version="1.0" encoding="UTF-8"?>
<START>
<A=value1>
<attr name1="a1">
</A>
<B=value2>
<attr name2="b1">
<attr name3="c1">
</B>
</START>
output xml file should be
=== (3 Replies)
Discussion started by: harpal singh
3 Replies
10. Shell Programming and Scripting
Dear All,
I need to transfer all files present in one location to another but those files should be of specific extension like.
Find and copy all files of extension .xls, .pdf, .txt from location usr/tmp to location /per/Treat (6 Replies)
Discussion started by: yadavricky
6 Replies
LEARN ABOUT DEBIAN
ts_packet_insert
TS_PACKET_INSERT(1) User Commands TS_PACKET_INSERT(1)
NAME
ts_packet_insert - insert packets into a Transport Stream
DESCRIPTION
Usage:
ts_packet_insert [switches] <infile> [switches]
Insert TS packets into a Transport Stream at a positions specified by the user.
Input:
<infile>
A H.222.0 TS stream.
Switches:
-p [positions]
This a a colon (':') delimited string of numbers between 0 and 1, representing how far through to put each ts packet. E.g. -p
0.1:0.4:0.7:0.9 will insert 4 packets at 10%, 40%, 70% and 90% through the file.
-pid [pid]
The inserted packets will have the pid specfied.
-s [string]
The inserted packets will contain [string] as it's payload.
-o [output file] The new TS file will be written out to the file
specified. (defaults to out.ts)
-h (--help)
This message.
Example:
ts_packet_insert -p 0.3:0.6 -o out.ts -pid 89 -s "AD=start" in.ts
ts_packet_insert [switches] <infile> [switches]
Insert TS packets into a Transport Stream at a positions specified by the user.
Input:
<infile>
A H.222.0 TS stream.
Switches:
-p [positions]
This a a colon (':') delimited string of numbers between 0 and 1, representing how far through to put each ts packet. E.g. -p
0.1:0.4:0.7:0.9 will insert 4 packets at 10%, 40%, 70% and 90% through the file.
-pid [pid]
The inserted packets will have the pid specfied.
-s [string]
The inserted packets will contain [string] as it's payload.
-o [output file] The new TS file will be written out to the file
specified. (defaults to out.ts)
-h (--help)
This message.
Example:
ts_packet_insert -p 0.3:0.6 -o out.ts -pid 89 -s "AD=start" in.ts
SEE ALSO
The full documentation for ts_packet_insert is maintained as a Texinfo manual. Please check http://tstools.berlios.de for more informa-
tion.
ts_packet_insert 1.11 November 2008 TS_PACKET_INSERT(1)