Execution problems when added two same content in each line

Input:

>sample_1
ASDAFDGSGH
>sample_2
ASDFDAFDSFS
>sample_3
ASDAFDAFDFD
>sample_4
ASDFDFDSFDSF
.

Desired output

>sample_1
ASDAFDGSGHXX
>sample_2
ASDFDAFDSFSXX
>sample_3
ASDAFDAFDFDXX
>sample_4
ASDFDFDSFDSFXX
.
.

I plan to add two more word "XX" at the end of each sample content.
Thanks for any advice :slight_smile:

For your provided input the below codes gives the expected output.

perl -i -pe 's/^([^>].+)$/$1XX/'  input_file
awk '/^>/ {print;getline;print $0 "XX"}' infile
or
awk '!/^>/ {$0=$0 "XX"}1' infile