code logs -> 2018 -> Mon, 26 Feb 2018< code.20180225.log - code.20180227.log >
--- Log opened Mon Feb 26 00:00:22 2018
00:15 Kindamoody is now known as Kindamoody[zZz]
00:25 Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
00:38 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [Connection closed]
00:39 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
00:39 mode/#code [+o Reiv] by ChanServ
01:37 Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
01:37 mode/#code [+o Kindamoody|autojoin] by ChanServ
03:38 KiMo|autorejoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
03:39 Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
04:33 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [The TLS connection was non-properly terminated.]
04:35 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
04:35 mode/#code [+o himi] by ChanServ
05:12 Derakon is now known as Derakon[AFK]
06:18 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
06:18 mode/#code [+qo Vornicus Vornicus] by ChanServ
06:24 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds]
06:31 celticminstrel [celticminst@Nightstar-gil1m1.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:04 Vornlicious [Vorn@Nightstar-ils7ka.sub-174-211-19.myvzw.com] has quit [Ping timeout: 121 seconds]
08:08 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
08:08 mode/#code [+qo Vornicus Vornicus] by ChanServ
08:20 Jessikat [Jessikat@Nightstar-jlpi1p.dab.02.net] has joined #code
08:34 Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
09:58 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
09:58 mode/#code [+o mac] by ChanServ
10:01 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
10:14 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
10:14 mode/#code [+o macdjord] by ChanServ
10:16 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
10:21 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
10:21 mode/#code [+o mac] by ChanServ
10:24 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
10:24 mode/#code [+o macdjord|slep] by ChanServ
10:24 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
10:26 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
10:27 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
10:27 mode/#code [+o mac] by ChanServ
10:28 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
10:41 KiMo|autorejoin is now known as Kindamoody
10:41 mode/#code [+o Kindamoody] by ChanServ
10:53 Degi [Degi@Nightstar-mijjeu.dyn.telefonica.de] has joined #code
11:18 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
11:18 Degi [Degi@Nightstar-mijjeu.dyn.telefonica.de] has quit [Connection closed]
11:21 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
13:04 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
13:04 mode/#code [+o macdjord|slep] by ChanServ
13:08 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
14:26 Jessikat` [Jessikat@Nightstar-q7i.159.132.82.IP] has joined #code
14:28
< simon_>
I'm trying to create a rotated log with bash:
14:29 Jessikat [Jessikat@Nightstar-jlpi1p.dab.02.net] has quit [Ping timeout: 121 seconds]
14:30
< simon_>
readLog log.txt | sed -n '1!p' | ... | writeLog log.txt how do I add $line at the end of the piped log content? I've just removed the first line using sed, but adding a line to the pipe, I'm not sure how to.
14:31
< simon_>
I'm trying to avoid using a variable.
14:36 Degi [Degi@Nightstar-orn9ji.dyn.telefonica.de] has joined #code
14:37
< simon_>
(readLog log.txt | sed -n '1!p'; echo "new latest line") | writeLog log.txt doesn't seem to work.
14:41
<&ToxicFrog>
I would expect it to; how does it fail?
14:42
<&ToxicFrog>
You could also use '$ a' in sed to append a line at the end.
14:43 Vornlicious [Vorn@Nightstar-7m9v56.sub-174-211-9.myvzw.com] has joined #code
14:44 Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds]
14:45
< simon_>
ToxicFrog, well, instead of turning "1\n2\n3" into "2\n3\n4", it just has "4" because it starts writing before reading has finished.
14:46
< simon_>
s/(?<=\d)"/\n"/g
14:48
<&ToxicFrog>
How do you mean?
14:49
<&ToxicFrog>
Like, AIUI your goal is to delete the first line and add a new last line, right?
14:49
< simon_>
(cat foo.txt | sed -n '1!p'; echo 4) | cat - > bar.txt # this actually seems to work.
14:49
< simon_>
yes.
14:49
<&ToxicFrog>
So why not just:
14:49
<&ToxicFrog>
sed -E -i '
14:49
<&ToxicFrog>
1 d
14:49
<&ToxicFrog>
$ a\
14:49
<&ToxicFrog>
new line goes here' log.txt
14:49
< simon_>
nice! I'll go with that. :)
14:50
< simon_>
I've never really learned to use sed. always stuck to perl for these one-liner things.
14:50
<&ToxicFrog>
(d is "delete line", a is "append harcoded text", $ is "the last line of the input")
14:51
< simon_>
and is there any way for 'new line goes here' to accidentally be interpreted as a series of sed commands?
15:02
< simon_>
that is, I've got my line in a sh variable.
15:26
<&ToxicFrog>
simon_: is there any chance it has embedded newlines?
15:26
<&ToxicFrog>
If not, you're good; the format of a is 'a' '\\' '\n' <text to insert> '\n'
15:27 Vornlicious [Vorn@Nightstar-7m9v56.sub-174-211-9.myvzw.com] has quit [[NS] Quit: Bye]
15:27 Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
15:28 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
15:28 mode/#code [+o mac] by ChanServ
15:29 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
15:43 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
15:43 mode/#code [+o macdjord] by ChanServ
15:45 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
15:45 mode/#code [+o macdjord|slep] by ChanServ
15:45 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
15:46 Degi [Degi@Nightstar-orn9ji.dyn.telefonica.de] has quit [Connection closed]
15:48 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
15:52 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
15:52 mode/#code [+o mac] by ChanServ
15:55 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
15:57 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
15:57 mode/#code [+o macdjord] by ChanServ
15:59 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
16:21 Kindamoody is now known as Kindamoody|out
16:22 Jessikat` [Jessikat@Nightstar-q7i.159.132.82.IP] has quit [[NS] Quit: Bye]
16:29 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed]
16:29 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
16:29 mode/#code [+o Syloq] by ChanServ
16:52
< simon_>
thanks, ToxicFrog.
16:53
<&ToxicFrog>
My biggest beef with the a, i, and c commands is that there's no way to do them on a single line.
19:03 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds]
19:14 Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code
19:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:53 Degi [Degi@Nightstar-orn9ji.dyn.telefonica.de] has joined #code
20:01 Kindamoody|out is now known as Kindamoody
20:07 RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has joined #code
20:18 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
20:18 mode/#code [+o mac] by ChanServ
20:20 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Connection closed]
20:49 gnolam [quassel@Nightstar-c8i2i4.dip0.t-ipconnect.de] has joined #code
20:49 mode/#code [+o gnolam] by ChanServ
22:16 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
22:16 mode/#code [+o macdjord] by ChanServ
22:18 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 122 seconds]
22:35 gnolam [quassel@Nightstar-c8i2i4.dip0.t-ipconnect.de] has quit [[NS] Quit: Z?]
22:39 Degi [Degi@Nightstar-orn9ji.dyn.telefonica.de] has quit [Connection closed]
22:39 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
--- Log closed Tue Feb 27 00:00:24 2018
code logs -> 2018 -> Mon, 26 Feb 2018< code.20180225.log - code.20180227.log >

[ Latest log file ]