Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Sort a text file based on names in square brackets Post 303024657 by Scally on Sunday 14th of October 2018 06:08:40 AM
Old 10-14-2018
It works a treat, thanks guys

Al.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

square brackets

I would like to substitute a phrase which contains square brackets. change TO how? Thanks (2 Replies)
Discussion started by: gilead29
2 Replies

2. Shell Programming and Scripting

WHy the double square brackets?

One of the senior administrators gave me a shell script to modify and it begins as follows: if ] && ] {more code follows} Why the double square brackets? (10 Replies)
Discussion started by: mojoman
10 Replies

3. Shell Programming and Scripting

Replacing text between two square brackets

hi guys, i'm writing a script that looks for a unquie id in a file and replaces a string between two square brackets on the same line as the unquie id: ....... ....... 0001 zz 43242 replace this text] name 0002 sd 65466 UK] country ....... ....... how can i find line with id 0001... (6 Replies)
Discussion started by: zaff
6 Replies

4. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

5. Shell Programming and Scripting

Extract text between two square [..] brackets

Hi All, After searching about this, I could find some solutions but I am not sure why it is not working in my case. I have a text file with contents between two square brackets. The text file looks like this: Use tags when you post any code so others can easily read your code. You can... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

6. Shell Programming and Scripting

Extract the text between the nth occurrence of square brackets

Please can someone help with this? I have a file with lines as follows: word1 word2 word3 word4 word5 word6 word7 word8 word1 word2 word3 word4 word5 word6 word7 word8 word1 word2 word3 word4 word5 word6 word7 word8 word1 word2 word3 word4 word5 word6 word7 word8 When I use the... (7 Replies)
Discussion started by: Subhadeep_Sahu
7 Replies

7. Shell Programming and Scripting

Compare the value in between square brackets in file

I wanted to compare the value inside the Squre bracket after Colon ( : ) based on any value(seperated by or operator | ) inside the variable Thread and if match found then wnated to store in output file Input file : 20140320 00:08:43.918 INO 35] - Corporate hub is 20140320 00:08:43.918... (2 Replies)
Discussion started by: nes
2 Replies

8. Shell Programming and Scripting

Grep number between Square [] brackets

I wanted to store the number inside the square bracket between colon( : ) and closing suqre bracket(]) in some variable. Suppose I have lines like : Input file : 20140320 00:08:23.846 INFO 84] - anything in line 20140320 00:08:23.846 Test 589] - Virtual and lab lab anything... (18 Replies)
Discussion started by: nes
18 Replies

9. Shell Programming and Scripting

Sort html based on .jar, .war file names and still keep text within three groups.

Output from zipdiff GNU EAR comparison tool produces output in html divided into three sections "Added, Removed, Changed". I want the output to be sorted by jar or war file. <html> <body> <table> <tr> <td class="diffs" colspan="2">Added </td> </tr> <tr><td> <ul>... (5 Replies)
Discussion started by: kchinnam
5 Replies

10. Shell Programming and Scripting

IF statement with square brackets

Hi All, Hope you all are doing good. Yesterday in my project i came across a scenario which i can not guess why it was working in one region and why it was not in another region. Please find my issue below. I am using AIX version 6.0 of UNIX in my project, in shell scripting i have the... (1 Reply)
Discussion started by: mad man
1 Replies
ES2TS(1)							   User Commands							  ES2TS(1)

NAME
es2ts - convert ES to TS SYNOPSIS
es2ts [switches] <infile> <outfile> DESCRIPTION
TS tools version 1.11, es2ts built Nov 11 2008 17:15:46 Convert an elementary video stream to H.222 transport stream. Supports input streams conforming to MPEG-2 (H.262), MPEG-4/AVC (H.264) and AVS. Also supports MPEG-1 input streams, insofar as MPEG-2 is backwards compatible with MPEG-1. Note that this program works by reading and packaging the elementary stream packages directly - it does not parse them as H.262 or H.264 data. Files: <infile> is a file containing the Elementary Stream data (but see -stdin below) <outfile> is an H.222 Transport Stream file (but see -stdout and -host below) Switches: -pid <pid> <pid> is the video PID to use for the data. Use '-pid 0x<pid>' to specify a hex value. Defaults to 0x68. -pmt <pid> <pid> is the PMT PID to use. Use '-pmt 0x<pid>' to specify a hex value. Defaults to 0x66 -verbose, -v Output summary information about each ES packet as it is read -quiet, -q Only output error messages -stdin Take input from <stdin>, instead of a named file -stdout Write output to <stdout>, instead of a named file Forces -quiet. -host <host>, -host <host>:<port> Writes output (over TCP/IP) to the named <host>, instead of to a named file. If <port> is not specified, it defaults to 88. -max <n>, -m <n> Maximum number of ES data units to read Stream type: When the TS data is being output, it is flagged to indicate whether it conforms to H.262, H.264 or AVS. It is important to get this right, as it will affect interpretation of the TS data. If input is from a file, then the program will look at the start of the file to determine if the stream is H.264, H.262 or AVS. This process may occasionally come to the wrong conclusion, in which case the user can override the choice using the following switches. If input is from standard input (via -stdin), then it is not possible for the program to make its own decision on the input stream type. Instead, it defaults to H.262, and relies on the user indicating if this is wrong. -h264, -avc Force the program to treat the input as MPEG-4/AVC. -h262 Force the program to treat the input as MPEG-2. -avs Force the program to treat the input as AVS. TS tools version 1.11, es2ts built Nov 11 2008 17:15:46 Convert an elementary video stream to H.222 transport stream. Supports input streams conforming to MPEG-2 (H.262), MPEG-4/AVC (H.264) and AVS. Also supports MPEG-1 input streams, insofar as MPEG-2 is backwards compatible with MPEG-1. Note that this program works by reading and packaging the elementary stream packages directly - it does not parse them as H.262 or H.264 data. Files: <infile> is a file containing the Elementary Stream data (but see -stdin below) <outfile> is an H.222 Transport Stream file (but see -stdout and -host below) Switches: -pid <pid> <pid> is the video PID to use for the data. Use '-pid 0x<pid>' to specify a hex value. Defaults to 0x68. -pmt <pid> <pid> is the PMT PID to use. Use '-pmt 0x<pid>' to specify a hex value. Defaults to 0x66 -verbose, -v Output summary information about each ES packet as it is read -quiet, -q Only output error messages -stdin Take input from <stdin>, instead of a named file -stdout Write output to <stdout>, instead of a named file Forces -quiet. -host <host>, -host <host>:<port> Writes output (over TCP/IP) to the named <host>, instead of to a named file. If <port> is not specified, it defaults to 88. -max <n>, -m <n> Maximum number of ES data units to read Stream type: When the TS data is being output, it is flagged to indicate whether it conforms to H.262, H.264 or AVS. It is important to get this right, as it will affect interpretation of the TS data. If input is from a file, then the program will look at the start of the file to determine if the stream is H.264, H.262 or AVS. This process may occasionally come to the wrong conclusion, in which case the user can override the choice using the following switches. If input is from standard input (via -stdin), then it is not possible for the program to make its own decision on the input stream type. Instead, it defaults to H.262, and relies on the user indicating if this is wrong. -h264, -avc Force the program to treat the input as MPEG-4/AVC. -h262 Force the program to treat the input as MPEG-2. -avs Force the program to treat the input as AVS. SEE ALSO
The full documentation for es2ts is maintained as a Texinfo manual. Please check http://tstools.berlios.de for more information. es2ts 1.11 November 2008 ES2TS(1)
All times are GMT -4. The time now is 09:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy