0

If I have the line

sed -E 's/([^ ]*) ([^ ]*) ([^,]*), *([^,]*), *([^,]*), *([^.]*), *([^,]*) *([^,]), ([^ ]*) *([^,]) *([^,])/\2, \1, \3, ``\4," \\emph{\5} \\textbf{\8},{\9} (\6)  /'

and I want to put it into a script called (Script.txt) how do I do that so I can run it against file.txt like this:

sed -f script.txt file.txt
Cyrus
  • 84,225
  • 14
  • 89
  • 153
userJoe
  • 73
  • 2
  • 12

1 Answers1

1
echo 's/([^ ]*) ([^ ]*) ([^,]*), *([^,]*), *([^,]*), *([^.]*), *([^,]*) *([^,]), ([^ ]*) *([^,]) *([^,])/\2, \1, \3, ``\4," \\emph{\5} \\textbf{\8},{\9} (\6)  /' > script.txt
sed -E -f script.txt file.txt
retrohacker
  • 3,194
  • 4
  • 21
  • 31