2
votes
Accepted
Remove duplicate lines based on specific string
sed? no. awk? yes.
The first one can be answered with
awk '!seen[$2]++' file
20151222051106 http://website.org/2015-12-11-art1
20151222050165 http://website.org/2015-12-12-art2
20151222051901 http://...
1
vote
Accepted
Can multiple command arguments into variable and be expanded back in POSIX script?
The backslashes are there to escape the parentheses from the shell (to the shell, parentheses launch the enclosed commands in a subshell)
If you're storing that phrase in a variable, omit the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
shell-script × 1456linux × 540
bash × 508
shell × 271
bash-scripting × 162
unix × 138
script × 136
command-line × 118
macos × 100
windows × 70
powershell × 67
ubuntu × 60
terminal × 46
sed × 45
awk × 39
ssh × 35
batch-file × 32
batch × 30
zsh × 30
find × 26
sh × 26
cron × 25
windows-10 × 24
grep × 23
perl × 20