Hey guys I dont know if this can be done with shell? There is a script with 200 lines and Im just interested in changing:
...
161. subject = subject.force_encoding('binary')
162. body = msg.force_encoding('binary')
163.
164. smtp.send_mail(<<EOS, @from, @to.split(/,/))
165. Date: #{Time::now.strftime("%a, %d %b %Y %X")}
...
For:
161. subject = subject.force_encoding('binary')
162. body = msg.force_encoding('binary')
163. converted_time = Time.now.utc
164. smtp.send_mail(<<EOS, @from, @to.split(/,/))
165. Date: #{converted_time.strftime("%a, %d %b %Y %X")}
....
Is that possible using shell? I know how to add content at the end or change the file with new content using > and >> but I dont know if modifying the file in this way is possible. If not, I'll just use a perl script i reckon.
(the numbers at the beginning of the code are not code, just for reference, its the number of the line)
bashyou cannot even copy a file (well maybe it is possible with some magic, but no-one does it normally). You need to usecpwhich is part of GNU tool-set. It would probably be helpful if you specified system. Windows also has a shell.