Search Results

Search: Posts Made By: kurumi
Forum: Solaris 02-06-2016
814
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,332
Posted By kurumi
be patient then.
be patient then.
1,332
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 ...
10,610
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,080
Posted By kurumi
show your code then
show your code then
1,011
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,327
Posted By kurumi
Ruby ruby -e 'Dir["*tests*"].each {|x|...
Ruby

ruby -e 'Dir["*tests*"].each {|x| File.delete(x) }'
785
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,204
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,086
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,707
Posted By kurumi
this thread is the most useless thread. ?
this thread is the most useless thread. ?
3,273
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,681
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,174
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 ...
4,759
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,174
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,010
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,217
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("_") ) }'
1,979
Posted By kurumi
that's not the correct output
that's not the correct output
1,979
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,138
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
2,943
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,475
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,083
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,667
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 06:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy