将一些文本附加到单词列表

Append some text to a list of words

我在 .txt 文件中有一个单词列表

About
Who
Get
Which
Go
Me
When
Make

我需要获得

user:About
user:Who
user:Get
user:Which
user:Go
user:Me
user:When
user:Make

你能建议我用什么来获得这个吗?列表太长,无法手动放置。 谢谢!

给你:

 sh script.sh list


 #!/bin/bash    
    while read line
    do

    #VARIABLES
    file=$line

    echo "user:"$file >> output

    done < 

希望对您有所帮助。 b.

perl -pi -e 's/^/user:/' a.txt