Date: 2017-06-14 11:13 pm (UTC)
henry_flower: A melancholy wolf (Default)
From: [personal profile] henry_flower
цікавий у них shellquote:

$ irb
2.3.2 :001 > class Array
2.3.2 :002?>     def shell_s
2.3.2 :003?>         cp = dup
2.3.2 :004?>         first = cp.shift
2.3.2 :005?>         cp.map { |arg| arg.gsub " ", "\\ " }.unshift(first).join(" ")
2.3.2 :006?>       end
2.3.2 :007?>   end
:shell_s
2.3.2 :008 > def system(*args)
2.3.2 :009?>     abort "Failed during: #{args.shell_s}" unless Kernel.system(*args)
2.3.2 :010?>   end
:system
2.3.2 :011 > system "echo omg I can't believe it"
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
Failed during: echo omg I can't believe it
$


гагага

Opens a Youtube page

Date: 2017-06-15 05:35 am (UTC)
punk_floyd: (Default)
From: [personal profile] punk_floyd
среди миллениаллов полно такого
там еще sudo вместе с curl'ом идут в паре
вот например

curl -L https://packagecloud.io/install/repositories/scalr/scalr-server-oss/script.deb | sudo bash
https://scalr-wiki.atlassian.net/wiki/display/docs/Installation+and+Upgrade+Instructions

Profile

juan_gandhi: (Default)
juan_gandhi

July 2017

S M T W T F S
       1
2 3 4 5 67 8
9 10 11 1213 14 15
16 17 18 19 20 21 22
23 242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 24th, 2017 08:43 pm
Powered by Dreamwidth Studios