Sponsored Content
Top Forums Shell Programming and Scripting read into a range of character Post 302570992 by tafazzi87 on Saturday 5th of November 2011 08:02:58 AM
Old 11-05-2011
Quote:
Originally Posted by ahamed101
I didn't quite understand your requirement! Can you illustrate with an example?... The input string and expected output...

--ahamed
if the user at the first read command insert "a" at the next iteration of while the user can insert [b-z]... if the users insert "f" the next [b-z] but without "f" and so on...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

read a variable character by character, substitute characters with something else

im having trouble doing this: i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's? im guessing its like getting the 1's compliment of the string im doing this in... (2 Replies)
Discussion started by: vipervenom25
2 Replies

2. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

3. Shell Programming and Scripting

need help in expanding hexa decimal character range

Hi all, I have a input like this 3AF9:3B01 and need to expand to the below output 3AF9 3AFA 3AFB 3AFC 3AFD 3AFE 3AFF 3B00 3B01 Please let me know the easiest way for achieving this. Thanks for the help in advance... (6 Replies)
Discussion started by: leo.maveriick
6 Replies

4. Shell Programming and Scripting

read the text file and print the content character by character..

hello all i request you to give the solution for the following problem.. I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print g go goo goog googl google like this Using unix Shell scripting... without using... (1 Reply)
Discussion started by: samupnl
1 Replies

5. UNIX for Dummies Questions & Answers

Use of character range in awk

Hi all, I am having a bit of a hard time using awk. I must do something wrong, but I don't know what... Any help would be greatly appreciated! I read a file, as follows :... ATOM 21 C THR A 4 23.721 -26.194 1.909 1.00 32.07 C ATOM 22 O THR A 4 ... (2 Replies)
Discussion started by: hypsis
2 Replies

6. UNIX for Advanced & Expert Users

Finding a specific range of character in file

hi, I want to store from 102 character to 128 character to a variable of header record which can be identified as 'HDR' which is the first 3 characters in the same line of a same.txt file. Please advise. Thanks (4 Replies)
Discussion started by: techmoris
4 Replies

7. Shell Programming and Scripting

Replacing character "|" in given character range

Hi I am having file : 1|2443094 |FUNG SIU TO |CLEMENT 2|2443095 |FUNG KIL FO |REMENT This file contains only 3 fields delimeted by "|". Last field is a decsription filed and it contains character "|". Due to this my output if breaking in 4 fields. I... (7 Replies)
Discussion started by: krsnadasa
7 Replies

8. Shell Programming and Scripting

Read character by character in line in which space is also included

Hi friend, I have one file , and i want to read that file character by character. I need this script in ksh. while using read option with -n1 am getting error. while read -n1 c read has bad option And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies

9. Shell Programming and Scripting

Grep - build character range with octal or hexa representation

Hello I would like to make a character range like that : echo "ABCDEF+1234" | grep -E ''or echo "ABCDEF+1234" | grep -E ''or echo "ABCDEF+1234" | grep -E ''Which should works on linux with english language And works also on linux with french language ( english install and after add french )... (4 Replies)
Discussion started by: jcdole
4 Replies

10. UNIX for Beginners Questions & Answers

Removing letters after a certain character within a range of columns

Hi there, I am trying to remove al letters after : character on specific columns from 10th column till 827. I used sed and cut to do so but I am sure there is better one liner someone can think of from unix community members. Huge file but it has this structure (Total number of Columns =... (10 Replies)
Discussion started by: daashti
10 Replies
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)
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy