10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
Hi I have a text file that I want to change some of the characters based on their position. My file contain multiple lines and characters should be counted continuously line by line. For example, I want to convert the 150th T to C. What can I do? Here is a portion of my file:... (10 Replies)
Discussion started by: a_bahreini
10 Replies
3. Programming
Hey!
I'm new to C. I need to covert certain values using C. please see the below. I have figured out the logic to do it. Please provide some hints to do this with C
Logic:
If first position of POS = 0, shift POS to the left one byte.
If third position of POS = 0, move spaces to third... (1 Reply)
Discussion started by: rocker_me2002
1 Replies
4. Shell Programming and Scripting
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
Discussion started by: elamurugu
5 Replies
5. Shell Programming and Scripting
The file has record length 200. And i have 100 search strings which are ten digits of character from 1 to 10 characters all of them are unique, they need to searched in a file. Please help me to pull the records based on position (say from 1-10).
test data
1FAHP2DW0BG115206RASHEED ... (6 Replies)
Discussion started by: zooby
6 Replies
6. UNIX for Dummies Questions & Answers
Trying to use sed - but having no luck.
I have a text file - I want to replace whatever character is in position 106, 157 and 237 w/ the string "xxx". Want this change for all lines w/in that text file.
I'm open to using awk or whatever command would be best for replacing characters based... (5 Replies)
Discussion started by: svn
5 Replies
7. UNIX for Dummies Questions & Answers
Hi Guys,
While I was writing one shell script , I just got struck at this point.
I need to extract words from a file at some specified position and do some comparison operation and need to replace the extracted word with another word.
Eg : I like Orange very much.
I need to replace... (19 Replies)
Discussion started by: kuttu123
19 Replies
8. Shell Programming and Scripting
Hi all;
I'm having headache on append one line to another based on the fix position.Hope u guys can help.
All i need to do is append the line that start with '3' to a line which start with '1' and the position for line 3 that i need to append is 22.
The original file look like this:
... (2 Replies)
Discussion started by: ashikin_8119
2 Replies
9. Shell Programming and Scripting
i want to split a big line based on the position.
example :
I have a single line which has 2300 characters.
i want to split from 1 character to 300th characters as first line
and 301th to 600 as second line and 601th to 900 as third line ...till the end of the string.
Can anyone help... (1 Reply)
Discussion started by: senthil_is
1 Replies
10. Linux
This command does not work for me. any ideas???
esc mode :$s/word-to-find/word-to-replace/g
For. e.g. :$s/mumbai/pune/g
Here word "mumbai" is replace with "pune" (1 Reply)
Discussion started by: singh85
1 Replies