« first day (1460 days earlier)      last day (3488 days later) » 
00:00 - 19:0019:00 - 00:00

12:40 AM
@slm (1) -name "*.pyc" – deferred wildcards should be quoted. (2) Either -delete or -exec rm {} +, but not what you said.
 
slm
@G-Man - sorry I wrote that quickly when my kids arrived home from school. You're correct, the *.pyc should be quoted to find.
$ find . -name "*.pyc" -delete or find . -name "*.pyc" -exec rm {} \; are the 2 proper ways to do this
 
going to nit that further. find -exec rm {} \;. I don't think there's any version of find which supports only one of -exec + or -delete, it's either both or none, so -delete would be the non-portable invocation, and -exec rm {} \; would be the portable one.
 
slm
fixed
that I do not know, I'm not up on which implementations are which, I assume you have GNU at this point.
 
1:07 AM
0
Q: bash question about if and then

Hajir Golmohammadihey im writing this on my script it has other body parts but i got stock on this part only. if [[$# == $year $month $day ]] ; then cal $day $month $year fi when i run this it give me this msg [[3: command not found so what is the problem? is it syntax or actual command year=$(echo "$year...

I'm not even going to touch this one with a 10" pole.
Why is everyone using "cal" instead of "date" or other more Unix-oriented epoch time-date schemes...
 
I edited the question before this comment and now I'm afraid that I have new super powers
 
1:32 AM
@slm: Are you there?
 
slm
@Gnouc - yes
 
With perl:

% perl -MO=Terse,-exec -e '$a = 0; print !$a++'
OP (0xfe1f60) enter
COP (0xfe0340) nextstate
SVOP (0xfe03e8) const IV (0xfdc658) 0
SVOP (0xfe0468) gvsv GV (0xfdc688) *a
BINOP (0xfe03a0) sassign
COP (0xfe1fa8) nextstate
OP (0xfe2008) pushmark
SVOP (0xfe2148) gvsv GV (0xfdc688) *a
UNOP (0xfe20c8) postinc [1]
UNOP (0xfe2088) not
LISTOP (0xfe2040) print
LISTOP (0xfe02d0) leave [1]
-e syntax OK
 
slm
@Gilles - came back and said he had explained it
 
you can see postinc is executed before not
:)
 
slm
What's the Terse module, never used that one before
that's the one, right?
 
1:37 AM
yes, and it's not Terse module, it's B::Terse
 
slm
right
does awk have a similar feature?
that would shut everyone up
8-)
 
I'm finding it :)
 
so, I got in touch with comcast support this past Saturday trying to solve a latency & packet loss issue. Well shortly after getting escalated to "level 2" I get disconnected, my modem reboots, and refuses to come back online, and after getting them (support) back, they can't figure out why.
Fast forward to today when they send out a field tech. The freakin support retards reconfigured my modem with their "non-payment" configuration.
 
@Patrick ha! that's comcast for ya! (the Braiam's way to say that is sad that you are tied with Comcast :( )
 
Unfortunately my only option if I want > 2mbit :-(
 
slm
1:48 AM
@Patrick dumb asses
I have time warner and never complain, only b/c I know comcast cares so much for their customers
 
I used to have Qwest (when I lived in CO). Awesome service
 
slm
Yeah I've heard good things about them before too. TW is actually very good considering. They give you a modem and just leave you alone.
When I've had problems 2x's they come out and I usually dumb it down by connecting my laptop into the modem for them to debug the issue and it's always an issue on the telephone pole so they have to swap out a connector
I've had them since 1999
I get the 50MB down 2MB up service
whatever the hell that means
 
Supposedly verizon is expanding out in this area. I'd be happy to give them a shot
 
sells his soul for a flat fiber line
 
mmmm, fiber
 
slm
1:57 AM
verizon would be awesome
for fiber
not for cell
 
@slm: I got it :))
dgawk> run
Restarting ...
Starting program:
[ 1:0x7f9fffd4ffe0] Op_rule : [in_rule = BEGIN] [source_file = test.awk]
[ 2:0x7f9fffd4ef80] Op_push_i : 0 [PERM|NUMCUR|NUMBER]
[ 2:0x7f9fffd4ef20] Op_store_var : a [do_reference = FALSE]
[ 3:0x7f9fffd4ef60] Op_push_lhs : a [do_reference = TRUE]
Stopping in BEGIN ...
Watchpoint 1: a
Old value: untyped variable
New value: 0
main() at `test.awk':3
3 !a++;
dgawk> s
[ 3:0x7f9fffd4efc0] Op_postincrement :
With gawk, we can use dgawk to debug
 
slm
s is a step in dgawk?
so it looks like you were right
it's untyped var to start and the new val is 0, then 1 interation through it's 0 now and 1
very nice work!
that's hugely handy to be able to debug awk like that.
If you wouldn't mind writing just the debugging up of both the perl and awk those would be awesome additions to the site.
 
@Gilles: See my updated answer.
 
slm
LMK if you need help
 
@slm: What is LMK?
 
slm
2:05 AM
sorry. Let Me Know
 
what a weird flag
 
@slm: Sorry for my poor English. Where can I "writing just the debugging up of both the perl and awk those would be awesome additions to the site."? I have updated my answer.
 
slm
I would make up a Q, such as. I have this piece of awk and I want to see what's going on with how it's parsing the code as it's executed.
It might be more suited to SO or both sites depending on how you frame the Q's
The key info you've acquired will likely be useful to others that want to understand how a piece of awk/perl is executing. I've only gotten a basic understanding of awk b/c I get rather confused as to what awk is doing as it parses a line of text. Looking at it in the debugger makes if much easier to follow.
Putting that into a Q&A would be extremely useful for others grappling with awk
@Braiam which flag?
 
@slm recent chat one, from gamedev
 
slm
the chat one?
I missed it
 
2:14 AM
@slm: I must back to my work now, I'm too busy with it, only starting for a month. Can you make the question as you said. I will get the relevant ASAP.
 
slm
I'm working now too
If I have a spare moment I'll try and make a Q and ping you on it
 
Oh, where do you live? I'm in Vietnam and it's 9h30 AM here
 
slm
2:29 AM
I live in New York state in US, it's 10:30PM here.
I'm generally working all the time. I'm learning about Ruby right now
Attempting to read a book and work out some code, but today has been another distracting day in here 8-)
Yesterday we were trying to quell everyone getting upset about creating a canonical Q&A about shell operators
 
question about gconf setting: I want to manually set a variable that I found in the schema, how do i set it? (im looking at guake)
 
2:47 AM
@Glennular gconftool-2 -s key?
 
will that change the schema defualt value or my user setting? where do user settings get saved?
ah got it. thanks i was trying to find a magic settings file, the tool did it for me.
 
3:32 AM
well i just screwed up
i installed slackware
and didn't install lilo, since slackware is my only OS
now it won't boot
so I'm trying to install lilo, and I can't figure out how.
at the current point in time, i'm trying to compile a kernel, but i'm getting an error while loading limpc.so.2... no such file or directory
/usr is sda2, /var is sda3, / is sda5, and /home is sda6
 
I wish everyone knew what I knew about your problem statement, @MillieSmith
 
sda1 is swap
 
Slack is a good choice to perform a drop-in replacement of a custom kernel.
 
lol @TylerMaginnis
if it would compile :(
 
/sda1 is usually "/" root partition, but it's SWAP in yours.
 
3:42 AM
idk. everything i read just now told me to put it on the first partition
 
What Kernel Version are you trying to compile? The 3.17 that dropped like the new NWA album?
 
heh
I'm not really sure
I'm in the /usr/src/linux-3.10.17 directory fumbling around
trying to run make config
 
libmpc*
 
May I suggest that you grab the latest, mainline stable Kernel to compile?
 
3:44 AM
i'm good with that, but i gotta get it onto my computer somehow
 
Please make sure your compiler version is up to date, as well. Slackware comes with a nice GCC toolchain that is usually up-to-date by Volkerdink, the maintainer.
No bootloader sounds like more of a problem.
 
well i just installed the latest slack, so i should be good on gcc as long as i can get the source youg ave me on there
yeah, though faq on slackware.com told me to try a new kernel if it didn't boot
 
Are you familiar with Live Linux recovery environments?
 
how can i get lilo on?
sort of
 
That's what you will need to install LILO.
 
3:45 AM
i mean
gah i was hoping my linux install cd would work for that
 
You need to be able to interact with your computer, but the drive, /dev/sda, needs to be unmounted.
So you need a good live CD.
Slackware install CD? Could work.
It does come with LILO packages.
 
really? i couldn't find them anywhere
 
i mean... it must have them, since it offered it at install
 
The 2nd link contains brief command-line instructions for installing lilo.
I think you'll find success with the instructions on the Slack Wiki page.
 
3:47 AM
yeah i found that wiki page
but i can't find a liloconfig on the install cd
 
You want to mount /dev/sda5
You don't need it.
 
and i get a no os-prober error if running it from my mounted sda5
 
Use $> vi /etc/llilo.conf
$> vi /etc/lilo.conf
then invoke $> /sbin/lilo -v
 
same thing as touch /etc/lilo.conf right?
i'm just creating the file?
cause it doesn't exist currently
 
So you want to boot with this line: huge.s root=/dev/sda5 noinitrd ro
Then you'll have to write one.
Ohhhh.
Okay you'll want to use the package manager.
 
3:49 AM
can't. no internet
 
It's on the CD
Have you tried looking in the binary directories on the install cd for liloconfig?
I know it's on there... Not trying to be presumptuous, but I dealt with it quite a bit earlier this year.
so that means what we're talking about is definitely possible, and the slack install CD is a very minimal environment
boot: hugesmp.s root=/dev/sda5 rdinit= ro
 
yeah i checked /bin
and there's no /sbin
 
Have you booted the Slack CD with your root partition on the boot-line?
 
i keep seeing that hugesmp line but i'm not sure what to do with it :). does it go in lilo.conf
 
No.
When you boot the slack CD.
 
3:51 AM
iooooooohhhhh
oh
 
You edit the Kernel Config Boot Line.
It's there in the CD bootloader.
Or whatever the heck it is.
 
suddenly that boot line at startup has more meaning
that boots with the hugesmp kernel right?
 
yeah.
 
k one sec. awesome
 
just the install CD with the hugesymmetric-multi-processing kernel
 
3:52 AM
haha
 
the liloconfig should, likely, be in your environment $PATH...
let me know if it's not. it's around there somewhere.
 
good point
shoulda echo'd that
 
the maintainer is also a subgenius... did you know?
that's where the name "Slack" comes from, the church of the subgenius ethos
 
haha
volterik or whatnot?
 
yup Volkerdink pays his dues for salvation.
 
3:54 AM
haha yep
 
I'm not allowed to call what I use based on Slackware Slackware, because it's Freeslack.
 
Freeslack is the best Slack money cannot buy.
 
i haven't heard of that one
 
It's Slackware with Free-Only Software.
 
3:55 AM
i used to run slack for about 6 months back around the time they first released 64 bit support
ah ok
the hugesmp kernel doesn't exist :/
gonna try huge
 
When you first boot into the install CD, there is a kernel command line.
use the kernel on the line that is there before you edit it.
Just change root to dev/sda5
 
huge is working
 
there are a few kernels on there yup
 
ok i'm in
 
try that $> liloconfig
^invoke
 
3:57 AM
apparently it's not in my path
command not found
 
do you have $> installpkg
 
$> pktool?
 
if i can find the lilo tar file, i can install it, but idk where it's located on here
 
[crtl+c will close these]
 
3:58 AM
command not found for pktool
 
It's in your local repository
 
will close what?
 
[pkgtool]
$> pkgtool
control+c will close whatever program is open in the terminal.
I am not sure of your skill level.
 
ah ok. yeah i know that much :)
i've been running linux systems off and on for 5 years or so. over the past year i've been mostly in windows, sometimes mac for development
i can work my way around the shell decently well, but don't know shell scripting and am pretty bad at setting up my linux boxes initially
and i use vi
pkgtool does not exist though
 
installpkg will work
I'm going to look where it is in the install cd hang on
 
4:00 AM
k danke
 
lilo-24.0-i486-4.txt 28-Oct-2013 04:56 590
lilo-24.0-i486-4.txz 28-Oct-2013 04:56 414K
lilo-24.0-i486-4.txz.asc 28-Oct-2013 04:56 198
it's in your /a/ base package set
one way to get lilo is to run the installer
and select only lilo from package set A
it will add it to your package manifest.
 
hmmmm
interesting
 
so you can actually use the CD to install and remove apps from your existing install.
 
i guess it's my only shot, so i'll give it a try if there's no way to find the source directly
cool cool
wait, if i run it with only lilo, that doesn't remove the other programs, does it/
?*
 
4:04 AM
k
 
I'm pretty certain it does not.
It didn't for me, at least.
 
it wants me to go through the whole process :
 
yeah it's time consuming to do it that way
 
selecting my source media, setting up my partitions, and selecting software categories
the latter of which i already did
 
well..
you do have $> installpkg
 
4:06 AM
if i can find the lilo*tgz file
 
yes....
do you have the $> find
Actually...
 
let me see
 
it's in a directory called /a/
 
yes find exists
 
check
$> cd /mnt/cdrom/
$> ls
 
4:08 AM
running it to search for lilo
hm k
 
well... find is more of a um
 
i'll check that in a sec
 
search by content
 
i found /mnt/sbin/eliloconfig
no /mnt/cdrom
 
$> fdisk -l
 
4:09 AM
lol
 
actually...
 
swap, linux, linux, extended, linux (boot), linux
 
give me device names
 
that's in order
 
cdrom?
 
4:09 AM
sda1, sda2, sda3, sda4, sda5, sda6
let me check for that
 
dmesg | grep cdrom
 
it's probably sr0
 
$> mount
will also list your mountings
 
that returned "cdrom: Uniform CD-ROM driver Revision: 3.20" haha
 
find where that drive is getting mounted, and if it's not mounted $> mkdir /mnt/cdrom/ && mount /dev/cdrom /mnt/cdrom/
 
4:10 AM
yes /dev/sr0 is mounted on /var/log/mount and is iso9660
 
cd /var/log/mont/
ls
 
yeeeeeesssssss
 
cd /a/
 
ls slackware64/a/ freeedom
 
$> installpkg lilo*.txz
wildcard that for your version or use tab completion or type in the full name of the txz
 
4:12 AM
package was installed
 
okay... that should give you liloconfig to follow the steps on slackwiki
$> liloconfig
you might have to track it down to the /bin/ on your hard drive.
 
i get "/sbin/liloconfig: line 98: /mnt/boot/boot_message.txt: No such file or directory"
 
$> vi /etc/lilo.conf
 
blank, but do you want me mounted into sda5 or on the install disc?
 
4:15 AM
shouldn't i mount sda5, copy lilo into there, and then chroot in, and then run installpkg?
 
um. yes actually that sounds about right.
(thought you were mounted into sda5)
 
heh, nah, my bad
 
I have to run now
 
k
gonna be back soon?
 
Sorry I can't support you more right now but I am on here a lot supporting people so just ping me.
 
4:17 AM
cool thanks
no problem
appreciate hte help
 
yeah tomorrow, actually. you can tag me on maginnist@gmail.com with any questions in the meantime or start a thread for other users to help you
I do linux platform development, and it's really intense right now between doing that and trying to scheme my way into a higher paying job doing it. :p
 
awesome, thanks
good luck making more money :)
 
@MillieSmith I wanted a quick look at that kernel error
@MillieSmith libMPC is one of your kernel prequisites, like libGMP, etc.
@MillieSmith the LFS Linux From Scratch site has a good description of these. They all sorta fall into the same category. MPC is used for advanced math, I think. I don't know much about it.
:) aight thanks
 
4:39 AM
@TylerMaginnis cool thanks.
i got a little bit farther
i got installpkg working, pkgtool seems to exist now, etc (while chrooted in)
though liloconfig exits silently
and vi seems to be missing from the install
screw this, i'll config myself
aaaahhh, here goes, i wrote the config file myself and ran lilo....
seems to have worked
will reboot now
oh come ON. shoot me.
it kernel paniced
on boot
i think i'm going to quit and do a fresh install on thursday
 
 
1 hour later…
6:09 AM
i think i got it actually. i think i need to use the huge kernel instead of the generic. slackware help says boot will fail with a kernel panic if you don't make an initrd.gz file, and i didn't
and frankly, if huge is going to work, i'll go with that for now and switch to generic later
i'm not with the box right now, but i'll try it next time i get the chance
 
 
4 hours later…
10:05 AM
Hey guys,
So im stuck on a small problem and cant figure how they did it.
Basically at this event i was at few months ago, They had a lan party tournament. After they connected all the pcs to a switch, they booted it up in windows and went to local webpage on the network, Where you entered what you wanted to call the pc, after you press okay it would register that pc on the network and change pc name all through internet explorer.
 
 
1 hour later…
11:17 AM
Now what could cause this?
I try the awk solution abovve and getting the message a[: Event not found. — Nilesh 11 mins ago
OP trying to run awk '!a[$1]++' and getting that message. Claims to not be using double quotes. What else could that be? I suspect PBCAK.
 
11:36 AM
Got it, he's using csh.
 
11:55 AM
@slm thanks for the edit, I forgot to explain that one.
 
slm
@terdon - I couldn't figure out what it was doing 8-)
 
Newb!
:P
 
slm
never seen that trick before, or I'm getting old and simply cannot remember if I did 8-)
 
You must have, I'm 99.9% sure I learned about rev here.
@slm why did you delete your answer here? I just reopened since it seems perfectly clear to me, went to answer and saw yours.
 
slm
@terdon - go ahead, I wasn't sure if that was going to help him or not.
there I reopened it
 
12:07 PM
@slm Huh? I already had.
 
slm
It was still showing as closed to me
I even reloaded the page a few times
 
caching
 
Always caching.
"Post reopened by terdon"
 
12:34 PM
in HTML / CSS / WebDesign on Stack Overflow Chat, 10 mins ago, by rlemon
https://nthitz.github.io/turndownforwhatjs/
 
 
2 hours later…
2:33 PM
the emacs stackexchange is now in public beta
 
3:03 PM
What's the perl command to print all duplicate lines based on the second column?
i tried this,
perl -lane 'print if $seen{@F[1]}++' file
But it shows only three lines instead of 6.
 
@Ramesh you want a not there.
 
@terdon ^^^
 
4
A: remove entire row in a file if first column is repeated

terdonA few ways: awk awk '!a[$1]++' file This is a very condensed way of writing this: awk '{if(! a[$1]){print; a[$1]++}}' file So, if the current first field ($1) is not in the a array, print the line and add the 1st field to a. Next time we see that field, it will be in the array and so wil...

@AvinashRaj look at the second perl solution there.
perl -lane 'print if !$seen{$F[1]}++' file
 
i want all the duplicate lines.
input:
a   apple
b   peach
c   grape
d   peach
e   peach
f   apple
output would be:
a   apple
f   apple
b   peach
d   peach
e   peach
 
3:19 PM
Oh, you want the dupes. OK
 
yep..
 
Not his then?
$ sort -uk2,2 file
a   apple
c   grape
b   peach
 
no, Perl please..
 
That's more complex. What is this for?
@AvinashRaj ?
 
here is the question
0
Q: Check which string in certain column is repeated

user3557715I want to see which string in my column 2 is repeated. For example: a apple b peach c grape d peach e peach f apple My output would be: a apple f apple b peach d peach e peach Showing the whole line that has common string on second column.

 
3:40 PM
This is a long shot, but anyone here familar with packaging a git repos with git submodules?
 
@AvinashRaj I wouldn't use perl for that. I'd either use the grep I posted or fedorqui's awk.
 
slm
@terdon - added 2 more to the list
15
Q: Let's compile a list of canonical Q&As

terdonA few of us were talking about this the other day in chat, as we are now quite a bit larger and with several thousand Q&As, there are certain questions that are asked very often. Things like redirecting output, process substitution, batch renaming of files, fixing/reinstalling grub, etc. Let's c...

copy/paste file from cli and remapping of keys
feel free to tweak
 
@slm Cool. I was fixing that up a bit the other day and my browser crashed and I lost everything. I have to get back to that at some point.
 
slm
We should try and see if we can put a general purpose keyboard remapping Q&A together. That topic is long overdue.
one that showed the various ways to do it. There's 3 tools that I'm aware of, also either show how to determine your key or reference in Gilles A about how keys presses get to the kernel, and then show the misc. key remapping tools such as xscape
that would mop up a lot of those annoying Q's which all 1/2 ass answered.
 
@slm Yes indeed. I was also thinking of creating something like this:
52
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

A master Q on a subject that contains links to the various answers.
 
slm
3:52 PM
oh yeah that would be a doosy
 
We would have to talk about how to implement it though since the question itself would understandably be closed as too broad.
At the very least, I plan to collect the stuff from that meta Q and make the Q itself a list of direct links to the relevant Q&As.
 
slm
that's cool, I didn't realize we could lock a Q from getting more A'ers.
excellent find!
 
@AvinashRaj I take that back, my grep fails. Perl works but is slower than the awk.
@slm perhaps I should write that kind of signpost/index question in meta.
 
slm
The meta is very interesting too on that Q
62
Q: Regex reference and its fate

HamZaBackground I was whining about the fact that regex tag suffers from bad quality questions and answers. I did something about it. I rampaged through the review queue: But I wasn't satisfied. I noticed high-rep users (3k+) answering such obvious questions. Now there are two types of questions...

 
4:09 PM
@slm Yeah, I was reading through that.
 
slm
so it's a wiki lock they're using
bring up the discussion and see what others thoughts are is all we can do
 
I just need to get around to writing the reference itself first. I'll probably start with a collection of [text-processing] issues.
 
slm
4:30 PM
2nd'ing @Braiam 's link. Good discussion for getting more capabilities into silver tag holders if you're interested in this type of meta across the SE sites.
18
Q: Empowering tag-badge holders part II - let's look at silver?

Tim PostNot long ago, we gave folks that have a gold tag badge the ability to instantly mark a question as a duplicate of another. This has worked out exceptionally well in practice. While there have been some disputed closings, the process is completely transparent and community oversight has worked jus...

 
4:55 PM
silver tag holders...
I'm going to read the above..
@slm yep, his work for regex tag is lot...
@terdon you mean grep in perl?
 
@AvinashRaj No, I had posted a wrong answer there using grep/sort but it was wrong so I deleted it.
 
@terdon
 
Sorry, just checking something :)
 
 
2 hours later…
6:57 PM
@terdon ??
 
00:00 - 19:0019:00 - 00:00

« first day (1460 days earlier)      last day (3488 days later) »