Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to comment a specific line of a file in Solaris 10? Post 303042676 by abhaydas on Friday 3rd of January 2020 07:22:52 AM
Old 01-03-2020
Thanks Ravinder and MadeInGermany , That helped
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to add a comment line in a text file

Hi I need to add a comment line at the begining of a text file. The scenario is given below. 1. The number of servers that needs to be updated is around 80 2. The location of the text file in all the servers are the same including the file name. 3. The comment has to be added at the very... (2 Replies)
Discussion started by: orakhan
2 Replies

2. UNIX for Dummies Questions & Answers

how to replace a text of line with a comment line

I want to replace this line : "test compare visible] true" and make it "#test compare visible] true". How can I do it ? And it should be checked in many sub folder files also. (6 Replies)
Discussion started by: manoj.b
6 Replies

3. Shell Programming and Scripting

Comment a line with SED

I have around 25 hosts and each hosts has 4 instance of jboss and 4 different ip attached to it . I need to make some changes to the startup scripts. Any tips appreciated. I have total of 100 instances which bind to 100 different ip address based on instance name. For example File1 ... (1 Reply)
Discussion started by: gubbu
1 Replies

4. Shell Programming and Scripting

uncomment or comment one specific line in a config file

Hello. I want comment or uncomment a ligne in a config file. The file name : /etc/samba/smb.conf Normaly the ligne is uncomment :so the line begin with a tab character followed by passdb backend =\tpassdb backend = In that case I should comment this line ... (2 Replies)
Discussion started by: jcdole
2 Replies

5. Shell Programming and Scripting

Using awk to read a specific line and a specific field on that line.

Say the input was as follows: Brat 20 x 1000 32rf Pour 15 p 1621 05pr Dart 10 z 1111 22xx My program prompts for an input, what I want is to use the input to locate a specific field. Like if I type in, "Pou" then it would return "Pour" and just "Pour" I currently have this line but it is... (6 Replies)
Discussion started by: Bungkai
6 Replies

6. Shell Programming and Scripting

comment a line of the patterns is a the beginning of the line

I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc. Ie only comment the line starting with exclude. File contents. exclude exclude= hi I am excluded excludes excludes= ... (9 Replies)
Discussion started by: anil510
9 Replies

7. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

8. Shell Programming and Scripting

How to comment a specific line of a file?

Hi, I need to comment out (insert # in the front of a line) a line that has entry Defaults requiretty using command-line as I need to do this on hundreds of servers. From Defaults requiretty To #Defaults requiretty I tried something like below but no luck: Please advise,... (3 Replies)
Discussion started by: prvnrk
3 Replies

9. Shell Programming and Scripting

Overwrite specific column in xml file with the specific column from adjacent line

I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file. Here is the file. <!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies

10. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies
mpgtx(1)							    User manual 							  mpgtx(1)

NAME
mpgtx, mpgsplit, mpgcat, mpgjoin, mpginfo, mpgdemux - manipulate mpeg files SYNOPSIS
mpgtx command [ options ] file [ range | file ] ... DESCRIPTION
mpgtx can split and join MPEG files in various ways. Three file types are currently handled (more to come): MPEG 1 Video files, MPEG 1/2 Audio files (mp1, mp2, and mp3), MPEG 1 System files (audio and video files), MPEG 2 Program files (Experimental), MPEG 2 Transport files (demultiplex and info modes only). mpgtx is a GOP (Group of Pictures) based editor. This means that mpgtx cuts MPEG files on a Group Of Picture basis, not on a frame-by-frame basis. A typical GOP duration is about 0.5 sec (approx. 15 frames), limiting the maximum accuracy of mpgtx. COMMANDS
-i prints information about files, such as duration, dimention, bitrate, etc. -j joins files (ranges may be specified, see the RANGES section). -s splits files according to the specified ranges (see the RANGES section). -d demultiplexes composite mpeg file. -T manipulates ID3v1 tags from mp3 files (see tagmp3(1)). -h prints a (not so) short help message. -v prints version and exit. -# where # is a number, splits the given files in # parts. --force enables joining of incompatible files (some players are very robust) --no-parachute prevents mpgtx to try to catch SIGSEGV signal. This is usefull for debugging. In addition, when invoked with the names mpgjoin, mpgcat, mpgsplit, mpgdemux, tagmp3 or mpginfo, mpgtx will modify its behaviour in the following ways: mpginfo behaves as mpgtx -i mpgsplit behaves as mpgtx -s mpgjoin behaves as mpgtx -j mpgcat behaves as mpgtx -j -o - mpgdemux behaves as mpgtx -d tagmp3 behaves as mpgtx -T OPTIONS
-f force overwriting of files, never ask. -Ax Change aspect ratio of mpeg. Valid are 1,2,3,4 for 1:1, 4:3, 16:9, 2.2:1 -P Keep junk or unusual headers in splits -X Desperate mode, search the whole movie for a valid PACK. In addition with Option -N no search infos will be displayed, only end sum- mary. -N Suppress progress output to the console. Speeds up operation a little on most Systems and much on Macintosh OS9. Suppress time line check in mpginfo mode. -b NAME each output file will have the basename NAME -o FILE FILE will be used as the output file (used with the join command). if FILE is -, standard output will be used. RANGES
Each range must follow a filename or another range. A range in an MPEG file can be specified using one of this three notations: Note for OSX Users: Ranges must be enclosed in single or double Quotes! [a-b] from value a inclusive to value b inclusive. If you want half opened ranges, you may want to use ]a-b], [a-b[ or ]a-b[. [n/ntot] the n th part out of ntot. [1/4] would result in the first quarter of the specified file. {a-b-...} with a , b , ... in ascending order. Split specified file at given boundaries. {55M} therefore means from beginnig of file to 55Megs and from 55Megs to the end of file. VALID VALUES
Values of ranges can be specified in seconds or as a byte offset. Time Format HH:MM:SS.SS where the HH: part can be omited Offset Format a number optionally followed by M for Megabytes k for kilobytes Omitted Values An empty value is valid and is equivalent to the corresponding file boundary: [-10M] are the first 10 Megabytes of the file. [1:10:04-] from 1 hour 10 minutes 4 seconds to the end of file. RETURN VALUE
All programs return 0 upon successful completion and 1 on failure. EXAMPLES
mpgjoin movie1.mpg [-0:32] [45M-75M] movie2.mpg -o joined.mpg joined.mpg will contain the first 32 seconds of movie1.mpg followed by 30 Megs of movie1.mpg starting at 45 Megs followed by the whole file movie2.mpg mpgtx -124 myfile.mpg -b output will split myfile.mpg in 124 parts with names output-001.mpg to output-124.mpg mpgtx -i Wazzup.mp3 will print infos about given file such as duration, bitrate, but also album, track, song name if this file has an ID3 tag. mpgcat myfile.mpg [2/2] | lpr will redirect the second half of myfile.mpg to your printer, emptying it from toner and paper and make you be fired by your boss... Use carefully. BUGS
Plenty of them :) GOP (Group of Picture) based: well this is not a bug but it's a limitation. As explained in the DESCRIPTION section, this limits the accu- racy of mpgtx on joins and splits to approximately 15 frames, or 0.5 seconds. Some artifacts can be seen with bad MPEG players playing joined files. These players don't take into account the broken link flag used to discard the first B frames they encounter. This is a bug in their MPEG decoding engine, not mpgtx. AUTHOR
Laurent Alacoque <laureck@users.sourceforge.net> CopyLeft 2001. Modified by Chris Danis <danish@debian.org>, copyleft 2001. Philipp Biermann <philipp@biermann.org>, copyleft 2002. Erik Schanze <schanzi_@gmx.de>, copyleft 2004. Get new releases and information from, and send patches, bugs, girls, money etc. to: http://mpgtx.sourceforge.net/ THANKS
for your attention. Have a good day. Godmar Back and Brent Phillips helped me to tune the command line interface. Volker Moell patiently teach me how to build rpms. Danke Volker. Jean Fransisco Sytem (alias Nicolas Schieli) helped me correct some nasty bugs. Thank you guys. Linux DECEMBER 2004 mpgtx(1)
All times are GMT -4. The time now is 12:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy