10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello guys, would you please help me with this?
this is the line inside a file:
first line Something Today YYDDPPSVXIPYYY0XXXOFFS00000000000?
I'd like to find the position of string XXX from string PYYY
In the example above
XXX starts from 6th position from PYYY
desired... (4 Replies)
Discussion started by: netrom
4 Replies
2. Shell Programming and Scripting
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies
3. Shell Programming and Scripting
Hi guyz i want to know nth position of character in string. For ex.
var="UK,TK,HK,IND,AUS"
now if we see 1st occurance of , is at 3 position, 2nd at 6,..4th at 13 position.
1st position we can find through INDEX, but what about 2nd,3rd and 4th or may be upto nth position. ?
In oracle we had... (2 Replies)
Discussion started by: Jonty Immortal
2 Replies
4. Shell Programming and Scripting
Hi gurus,
I am trying to figure out how to extract substring from file line (all lines in file), as specified position and specified legth.
Example input (file lines)
dhaskjdsa dsadhkjsa dhsakjdsad hsadkjh
dsahjdksahdsad sahkjd sahdkjsahd sajkdh adhjsak
I want to extract substring on... (5 Replies)
Discussion started by: ProsteJa
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Can anyone let me know the command to know the list of filenames that have string 31 in their 4th and 5th positions inside the file:
grep -l "31" main*.txt
The above grep lists all the files which have 31 at any position but I want filenames having 31 at position 4 and position 5. (8 Replies)
Discussion started by: okkadu
8 Replies
6. Shell Programming and Scripting
Hi
I want to use korn shell.
I have files in a directory of following format
abc01of09xyz
abc02of09mno
aabc03of09qrs
---
--
requirement first is to check if any files of format "abc*of*" exists. If yes then match the number of such files with the number mentioned in each files(09 in... (1 Reply)
Discussion started by: subusona
1 Replies
7. Shell Programming and Scripting
I have a file with the below format,
GS*8*****
ST*1********
A*
B*
E*
RMR*123455(This is the unique number to locate this row)
F*
SE*1***
GE**
GS*9*****
ST*2
H*
J*
RMR*567889(This is the unique number to locate this row)
L*
SE*
GE***** (16 Replies)
Discussion started by: Muthuraj K
16 Replies
8. Shell Programming and Scripting
Hi,
I have a file named "Test_2008_01_21"
The file contains a string "manual" that occurs many times in the file
How can i find the positions of the string "manual" in the file
Ex: if the string " manual " occurs three times in the file. i want to replace the second occurance of string... (6 Replies)
Discussion started by: bab123
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am a newbie in unix programming so maybe this is a simple question.
I would like to know how can I make a script that outputs only the values that are not between any given start and end positions
Example
file1:
2 30
40 80
82 100
file2:
ID1 1
ID2 35
ID3 80
ID4 81
ID6... (9 Replies)
Discussion started by: fadista
9 Replies
10. Shell Programming and Scripting
I need a script for...
how to find a position of column data and print some string in the next line and same position
position should find based on *HEADER8* in text
for ex: ord123 abs 123 987HEADER89 test234
ord124 abc 124 987HEADER88 test235
... (1 Reply)
Discussion started by: naveenkcl
1 Replies