Skip to main content
deleted 43 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt ## Alternatively, you could change the 2nd line with the following; sed -f $HOME/sed_scpt.txt $2 > $HOME/desired_output.txt 

Hope this helps.

NOTE: I've used GNU sed 4.2.1, if that matters as well.

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt ## Alternatively, you could change the 2nd line with the following; sed -f $HOME/sed_scpt.txt $2 > $HOME/desired_output.txt 

Hope this helps.

NOTE: I've used GNU sed 4.2.1, if that matters as well.

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt ## Alternatively, you could change the 2nd line with the following; sed -f $HOME/sed_scpt.txt $2 > $HOME/desired_output.txt 

NOTE: I've used GNU sed 4.2.1.

added an alternative
Source Link
nvarun
  • 53
  • 1
  • 8

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt   ## Alternatively, you could change the 2nd line with the following; sed -f $HOME/sed_scpt.txt $2 > $HOME/desired_output.txt 

Hope this helps.

NOTE: I've used GNU sed 4.2.1, if that matters as well.

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt 

Hope this helps.

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt   ## Alternatively, you could change the 2nd line with the following; sed -f $HOME/sed_scpt.txt $2 > $HOME/desired_output.txt 

Hope this helps.

NOTE: I've used GNU sed 4.2.1, if that matters as well.

Source Link
nvarun
  • 53
  • 1
  • 8

Try the following script;

## $1 - Small File ## $2 - Large File sed 's/^/\//; s/$/\/d/; s/\\/\\\\/g' $1 > $HOME/sed_scpt.txt sed 's/\\/\\\\/g' $2 | sed -f $HOME/sed_scpt.txt > $HOME/desired_output.txt 

Hope this helps.