Search Results

Search: Posts Made By: tinman47
15,798
Posted By tinman47
This is the best forum of all time :D Both...
This is the best forum of all time :D

Both solutions worked. Thank you.
15,798
Posted By tinman47
Using sed to replace a string in a specific position
I asked this before, but my problem got more complicated. Heres what I am trying to do:

I'm trying to replace a string at a certain location with another string.

Heres the file I'm trying to...
8,669
Posted By tinman47
Incredible! Once again. Thank you.
Incredible! Once again. Thank you.
8,669
Posted By tinman47
Now next question! ;D How would I put a...
Now next question! ;D

How would I put a variable in place of the row and column to designate any row or column?
8,669
Posted By tinman47
IT WORKED! I'm so sorry. I forgot sed doesn't...
IT WORKED! I'm so sorry. I forgot sed doesn't know how to read empty files and I left it empty.

lol This is the best forum ever. Thanks guys. :D
8,669
Posted By tinman47
Nothing! :wall: That should have worked....
Nothing! :wall:

That should have worked. Maybe I'm putting in the wrong input file or something. Give me an example on how I should output to a file on the sed statement.
8,669
Posted By tinman47
The digit 1 is there. Where would I place the...
The digit 1 is there. Where would I place the newchar?

Scrutinizer, the problem with sed, is that when I have to move it to a column, there is more than one occurence of the designated string, so...
8,669
Posted By tinman47
For some strange reason, your code isn't...
For some strange reason, your code isn't working... Maybe is it because I'm on Cygwin? I can't see any output in my file when I open it.
8,669
Posted By tinman47
Oh that was just supposed to contain an escape...
Oh that was just supposed to contain an escape code.
8,669
Posted By tinman47
ahamed101, I don't know why your codes not...
ahamed101, I don't know why your codes not working. Seems legit though.
8,669
Posted By tinman47
Well the idea is that im creating a paint...
Well the idea is that im creating a paint program. So the file starts as a canvas of black escape codes. So here is what the input file would look like:

\E[0;40m \E[0;40m \E[0;40m \E[0;40m...
8,669
Posted By tinman47
What about grep, or awk? Is there anything I can...
What about grep, or awk? Is there anything I can do?
8,669
Posted By tinman47
sed can't work with columns?
sed can't work with columns?
8,669
Posted By tinman47
Can sed output an empty file?
Can sed output an empty file?
8,669
Posted By tinman47
The input is supposed to be an empty file. ...
The input is supposed to be an empty file.

Then the script is supposed to output a text string at the 3rd line, 10th column.

I keep getting no output.
8,669
Posted By tinman47
Did what you said. Made a temporary file. I see...
Did what you said. Made a temporary file. I see nothing outputted to the file. Can you give me what you put for it to work?
8,669
Posted By tinman47
sed "${3} s/./${\n}/${10}" <test.txt...
sed "${3} s/./${\n}/${10}" <test.txt >test.txt
8,669
Posted By tinman47
The example is on my first post
The example is on my first post
8,669
Posted By tinman47
Problem with sed
I need to insert, or replace a character at a designated row and column in a text file with sed. Heres the code:

sed "${row} s/./${newchar}/${col}" >test.txt

Everytime I use this code on...
1,818
Posted By tinman47
For example, I want to open a text file, move to...
For example, I want to open a text file, move to the 2nd row, 10th column in the file, and put the escape code "\n".
1,818
Posted By tinman47
Wow. Thanks :D Can you be specific on how to...
Wow. Thanks :D

Can you be specific on how to move to a column, then to a row with sed?
1,818
Posted By tinman47
Can I use "sed" to go to a certain column or row...
Can I use "sed" to go to a certain column or row in a text file and delete or add text?
1,818
Posted By tinman47
Please help. Complicated text file manipulation problem
Let me try my best to give you a picture of what I'm trying to do. Once again I'm sorry for the essay thats coming up.

I programmed a rather large library of script functions to deal with input,...
7,222
Posted By tinman47
So. Any ideas? Is what I'm trying to do possible?
So. Any ideas? Is what I'm trying to do possible?
7,222
Posted By tinman47
I've already done that. I created the a temporary...
I've already done that. I created the a temporary file to hold all paint routines. When the user wants to save the file, the temporary file is exported. Problem is formatting the file so it displays...
Showing results 1 to 25 of 38

 
All times are GMT -4. The time now is 05:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy