Search Results

Search: Posts Made By: Johnny2518
1,492
Posted By Johnny2518
Problem with Shell Scripts deleting text in files.
Me and a friend are working on a project, and We have to create a script that can go into a file, and replace all occurances of a certain expression/word/letter with another using Sed. It is designed...
4,020
Posted By Johnny2518
I'm trying, the only problem is i don't...
I'm trying, the only problem is i don't understand this section that i am doing. I entered the first script you gave me and it said that it did not work because it could not find the file.
4,020
Posted By Johnny2518
This should help as to what it expects. It wants...
This should help as to what it expects. It wants us to Generalize your sub2 script, producing a new script sub3 that will apply a substitution to any number of files given on the command line.
For...
4,020
Posted By Johnny2518
I typed in #!/bin/sh # Save first two...
I typed in
#!/bin/sh

# Save first two parameters
A="$1"
B="$2"

shift 2 # Get rid of first two parameters

while [ "$#" -gt 0 ]
do
sed "s/$A/$B/g" $1 > $1.new
shift...
4,020
Posted By Johnny2518
Sorry for the confusion. I entered in the code...
Sorry for the confusion. I entered in the code you showed, and ran a program that takes that code and uses it on different files. While in the file it finds a certain expression and replaces it with...
4,020
Posted By Johnny2518
Help
When i try that, it still says that it produced incorrect output. I can not find the error that is happeneng:wall::wall:
2,056
Posted By Johnny2518
Help with Shell Scripts Using sed in multiple files.
Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. I use the program to change an occurance...
4,020
Posted By Johnny2518
I use the program to change an occurance of a...
I use the program to change an occurance of a word throughout different files that are being tested. At first i had to Create a new script, sub2, taking the same three parameters (replacing an...
4,020
Posted By Johnny2518
Help with Shell Scripts Using sed in multiple files.
Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. What i have so far is

!/bin/sh...
Showing results 1 to 9 of 9

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