Search Results

Search: Posts Made By: jzhang172
4,748
Posted By jzhang172
Oh, sorry, correction, I think there was alot of...
Oh, sorry, correction, I think there was alot of confusion about what I was looking for: I am just trying to edit this code:

#!/bin/bash if grep "$1" "$3" > /dev/null; then mv $3 $3.bak sed...
4,748
Posted By jzhang172
Ok thanks for the reply! :D For Corona: ...
Ok thanks for the reply! :D

For Corona:
It's part of the book assignment so I have to do what it says, I don't have a choice haha. So unfortunately, your code doesn't work :(.

Danmero:
Code...
4,748
Posted By jzhang172
Shell script [Generalizing]
#!/bin/bash
if grep "$1" "$3" > /dev/null; then
mv $3 $3.bak
sed "s/$1/$2/g" $3.bak > $3
fi

Hello there, I am trying to edit this code so that it will produce a shell script called "subst"...
3,772
Posted By jzhang172
Ok, so I actually tried a different approach and...
Ok, so I actually tried a different approach and it works, your code works great too :D

#!/bin/bash
if grep "$1" "$3" > /dev/null; then
mv $3 $3.bak
sed "s/$1/$2/g" $3.bak > $3
fi
However, i...
3,772
Posted By jzhang172
Thanks for the code above, but I'm afraid my...
Thanks for the code above, but I'm afraid my knowledge of shell script does not extend that far :(...I do not know how to use the while command or done. I'm vaguely familiar with shift as well...
...
3,772
Posted By jzhang172
Hey thanks for that, it worked :D but...
Hey thanks for that, it worked :D

but there's another problem now...we are trying now to create a second script called "subst2" that does the exact same thing as the "subst1" but leaves the file ...
3,772
Posted By jzhang172
Shell Script [Replacing string]
My friend and I are working on a project together and we are trying to create a shell script that renames, replaces a string in a text file. The newly created file with the substitution would...
1,741
Posted By jzhang172
Help with MakeFile
I'm really confused how to use a makefile.

Are you supposed to be make a file from emacs called MakeFile and put code in there to compile?

I am trying to create a makefile to compile two .cpp...
Showing results 1 to 8 of 8

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