Difference between revisions of "User talk:Grufo"

From ArchWiki
Jump to: navigation, search
(pacman tips: let's see if your IFS is OK)
(pacman tips)
Line 37: Line 37:
 
:::I think that, since in a bash context a separator is a space and not a newline, an "universal" solution is to use spaces instead of newlines. But this is my opinion.--[[User:Grufo|Grufo]] <sup>[ [[Special:Contributions/Grufo|contribs]] | [[User_talk:Grufo|talk]] ]</sup> 20:30, 21 November 2012 (UTC)
 
:::I think that, since in a bash context a separator is a space and not a newline, an "universal" solution is to use spaces instead of newlines. But this is my opinion.--[[User:Grufo|Grufo]] <sup>[ [[Special:Contributions/Grufo|contribs]] | [[User_talk:Grufo|talk]] ]</sup> 20:30, 21 November 2012 (UTC)
 
::::Do you get any errors when running {{ic|sudo pacman -Rs $(pacman -Qqdt)}} in the terminal? What's the output of {{ic|<nowiki>echo "$IFS" | cat -te</nowiki>}}? If you substitute the sed part with {{ic|tr '\n' ' '}}, does it still work for you? -- [[User:Karol|Karol]] ([[User talk:Karol|talk]]) 21:09, 21 November 2012 (UTC)
 
::::Do you get any errors when running {{ic|sudo pacman -Rs $(pacman -Qqdt)}} in the terminal? What's the output of {{ic|<nowiki>echo "$IFS" | cat -te</nowiki>}}? If you substitute the sed part with {{ic|tr '\n' ' '}}, does it still work for you? -- [[User:Karol|Karol]] ([[User talk:Karol|talk]]) 21:09, 21 November 2012 (UTC)
 +
:::::@Karol
 +
:::::> Do you get any errors when running {{ic|sudo pacman -Rs $(pacman -Qqdt)}} in the terminal?
 +
:::::No, out of alias context {{ic|sudo pacman -Rs $(pacman -Qqdt)}} works
 +
:::::> What's the output of {{ic|<nowiki>echo "$IFS" | cat -te</nowiki>}}?
 +
:::::What is {{ic|$IFS}}?? However the output is:
 +
:::::{{bc|<nowiki>^I$
 +
$</nowiki>}}
 +
:::::> If you substitute the sed part with {{ic|tr '\n' ' '}}, does it still work for you?
 +
:::::Substituting the sed part with {{ic|tr '\n' ' '}} it works fine!
 +
:::::--[[User:Grufo|Grufo]] <sup>[ [[Special:Contributions/Grufo|contribs]] | [[User_talk:Grufo|talk]] ]</sup> 19:54, 22 November 2012 (UTC)

Revision as of 19:54, 22 November 2012

pacman tips

1. Why do you think you need to change newlines to spaces?

2. I think that Archers are capable of creating trivial aliases and functions themselves.

-- Karol (talk) 19:24, 21 November 2012 (UTC)

@Karol
1. Because it doesn't work with newlines in an "alias" context. Try yourself!
2. I'm an "Archer" and know Bash, but I spent ten minutes to write that line. Do you think that a Wiki should tell everyone: «Ok, guy, find yourself the solution»?
--Grufo [ contribs | talk ] 19:39, 21 November 2012 (UTC)
1. Works here:
$ pacman -Qqdt
firefox
flashplugin
$ pacro
checking dependencies...

Targets (7):

Name            Old Version     New Version  Net Change

libevent        2.0.20-1                      -1,79 MiB
libnotify       0.7.5-1                       -0,26 MiB
mime-types      8-1                           -0,05 MiB
mozilla-common  1.4-3                         -0,02 MiB
nss             3.14-1                        -5,70 MiB
firefox         16.0.2-1                     -21,52 MiB
flashplugin     11.2.202.251-1               -20,83 MiB

Total Removed Size:     50,16 MiB

Do you want to remove these packages? [Y/n] n
$ type pacro
pacro is aliased to `/usr/bin/pacman -Qtdq > /dev/null && sudo /usr/bin/pacman -Rs $(/usr/bin/pacman -Qtdq)'
(I'm watching this page, so it's not necessary to edit my talk page to notify my of your response, but thanks anyway) -- Karol (talk) 20:21, 21 November 2012 (UTC)
Your solution with newlines doesn't work on my computer :-( It works fine only with spaces.
I think that, since in a bash context a separator is a space and not a newline, an "universal" solution is to use spaces instead of newlines. But this is my opinion.--Grufo [ contribs | talk ] 20:30, 21 November 2012 (UTC)
Do you get any errors when running sudo pacman -Rs $(pacman -Qqdt) in the terminal? What's the output of echo "$IFS" | cat -te? If you substitute the sed part with tr '\n' ' ', does it still work for you? -- Karol (talk) 21:09, 21 November 2012 (UTC)
@Karol
> Do you get any errors when running sudo pacman -Rs $(pacman -Qqdt) in the terminal?
No, out of alias context sudo pacman -Rs $(pacman -Qqdt) works
> What's the output of echo "$IFS" | cat -te?
What is $IFS?? However the output is:
^I$
$
> If you substitute the sed part with tr '\n' ' ', does it still work for you?
Substituting the sed part with tr '\n' ' ' it works fine!
--Grufo [ contribs | talk ] 19:54, 22 November 2012 (UTC)