Search Results

Search: Posts Made By: kurumi
Forum: Solaris 02-06-2016
838
Posted By kurumi
Modern systems and login parameters
With Solaris newer versions where SSH is enabled by default, do we still need to configure security parameters in /etc/default/login for e.g. SLEEPTIME, CONSOLE etc?
1,451
Posted By kurumi
be patient then.
be patient then.
1,451
Posted By kurumi
if you have Ruby on your system array=[] ...
if you have Ruby on your system


array=[]
File.open("file").each_line do |line|
first = line.split(/\s+/).first
if not array.include?(first)
puts line
array << first
end ...
11,197
Posted By kurumi
if you have Ruby on your system x =...
if you have Ruby on your system

x = File.open("file").readlines.map(&:chomp)
x.each_slice(7) { |y| puts y.join(" ") }


output

# ruby test.rb
a1 a2 a3 a4 a5 a6 a7
b1 b2 b3 b4 b5 b6 b7...
1,103
Posted By kurumi
show your code then
show your code then
1,044
Posted By kurumi
hand translate yourself and learn some Perl. for...
hand translate yourself and learn some Perl. for example this

PXNAME=$(echo $line | awk -F, '{print $1}')

is just getting the first field of a comma delimited line. you can
use split() in...
7,810
Posted By kurumi
Ruby ruby -e 'Dir["*tests*"].each {|x|...
Ruby

ruby -e 'Dir["*tests*"].each {|x| File.delete(x) }'
820
Posted By kurumi
if you have Ruby # number=$(echo "c12" |...
if you have Ruby

# number=$(echo "c12" | ruby -e "puts gets.scan(/\d+$/)")
# echo $number
12
2,271
Posted By kurumi
there's no need to convert to int unless you want...
there's no need to convert to int unless you want to do some mathematics on those columns. Your column contains letters. What are you actually trying to do with that column?
1,115
Posted By kurumi
if you know sox is a binary, there are only a few...
if you know sox is a binary, there are only a few "known" locations you can search from ifyou have done the installation right in the first place.
Forum: What is on Your Mind? 01-04-2014
1,745
Posted By kurumi
this thread is the most useless thread. ?
this thread is the most useless thread. ?
3,354
Posted By kurumi
if you have Ruby # ruby -F"\s+" -ane...
if you have Ruby

# ruby -F"\s+" -ane '$F[3..-1].each{|x| puts $F[0..2].join(" ") + " " + x }' file
LG1 R500 A-170 F1:81
LG1 R500 A-170 F1:22
LG1 R500 A-170 F2:32
LG1 R500 A-170 F1:71
LG1 R700...
1,730
Posted By kurumi
Learning Perl, just go to perldoc perl ...
Learning Perl, just go to

perldoc perl

also for cgi

perldoc CGI

the Perl docs are all you need.
1,200
Posted By kurumi
if you have Ruby # get list_file to array ...
if you have Ruby

# get list_file to array
list_file = File.open("list_file").readlines.map(&:chomp)

line_count = Hash.new { |h,k| h[k] = 0 } # create dictionary to store counts
f ...
5,295
Posted By kurumi
if you have Ruby # echo...
if you have Ruby

# echo '"value1","value2","value3 "," value4","value5"' | ruby -e 'puts gets.gsub(/"|,*\s+,*/,"")'
value1,value2,value3,value4,value5
4,482
Posted By kurumi
if you have Ruby f2 =...
if you have Ruby


f2 = File.open("file2").readlines.map(&:strip) # read file2 , store in array
File.open("file1").read.split(">").each do |record|
if not record.eql?("") and
...
1,048
Posted By kurumi
if you have Ruby #!/usr/bin/env ruby -w ...
if you have Ruby

#!/usr/bin/env ruby -w
hash = Hash.new {|h,k| h[k] = [] } # create a hash
File.open("file").each_line do|line|
dat = line.chomp.split # get...
1,258
Posted By kurumi
if you have Ruby ls MIST* | ruby -e...
if you have Ruby

ls MIST* | ruby -e 'ARGF.each{|x|x.chomp!;File.rename(x, x.split("_")[3..-1].join("_") ) }'
2,034
Posted By kurumi
that's not the correct output
that's not the correct output
2,034
Posted By kurumi
if you have Ruby # ruby -ne 'puts...
if you have Ruby

# ruby -ne 'puts $_.sub(/_(exon|intron).*/,"")' file
intergenic_Nedd4
Gapvd1
Gapvd1
2,217
Posted By kurumi
# echo "abcd fkaj&dsdsd" | ruby -e 's=gets; puts...
# echo "abcd fkaj&dsdsd" | ruby -e 's=gets; puts s.gsub(/([& ;])\1*/,"\\\\\\1")'
abcd\ fkaj\&dsdsd
3,022
Posted By kurumi
# echo $mp4 ...
# echo $mp4
VFX_Official_Trailer_(HD)__Shhh__-_by_Freddy_Chavez_Olmos_&_Shervin_Shoghian-[YT-f22][Ht2aZLf8q_8].mp4

# echo "$mp4"| ruby -e 's=gets; puts...
1,545
Posted By kurumi
If you have Ruby r=$(echo "//server" | ruby...
If you have Ruby

r=$(echo "//server" | ruby -e 's=gets; puts s[/^\/\//] && s.count("/")==2? 0:1 ')
# check if $r == 0
1,123
Posted By kurumi
bring your password outside the script. Usually...
bring your password outside the script. Usually the way to do this is via a database that provide login mechanisms + encryption. If not, you can set up an encrypted file that stores the password. See...
2,733
Posted By kurumi
perldoc perlre
perldoc perlre
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy