Search Results

Search: Posts Made By: balajesuri
Forum: What is on Your Mind? 17 Hours Ago
192
Posted By balajesuri
Way to go Ravinder and Victor! You deserve it :)
Way to go Ravinder and Victor! You deserve it :)
Forum: What is on Your Mind? 4 Weeks Ago
627
Posted By balajesuri
...and learned a lot along the way :) Thanks for...
...and learned a lot along the way :) Thanks for the efforts.
867
Posted By balajesuri
1/ The first thing I observed is that you're...
1/
The first thing I observed is that you're doing
for var in `cat filename`
do
...
done
instead of
while read line
do
...
done < filename



2/
Next I see that in the inner loop...
907
Posted By balajesuri
Why not use awks' own printf? - Printf Examples...
Why not use awks' own printf? - Printf Examples (The GNU Awk User’s Guide) (https://www.gnu.org/software/gawk/manual/html_node/Printf-Examples.html)
Forum: Programming 11-04-2019
895
Posted By balajesuri
Since you're using python3, you can also take...
Since you're using python3, you can also take advantage of string formatting:


'https://www.meihoski.co.jp/movie/{}'.format(a['href'])

Check this out: 6.1. string — Common string operations —...
Forum: Programming 09-05-2019
5,375
Posted By balajesuri
Minor edit
1. Read the file "SHA256" line by line in a loop. (for line in filehandle)

2. Tokenise each line as you read - the result will be stored in a list (hint: split after you strip)

3. The last item...
323
Posted By balajesuri
I think OP is asking for side by side printing of...
I think OP is asking for side by side printing of the output of two python scripts as they run, and has shown as an example, concatenation of two text files using izip_longest().


@bigvito19...
2,579
Posted By balajesuri
On GNU bash, version 4.4.12 $ echo...
On GNU bash, version 4.4.12



$ echo ${text:1:-1}
001E:001F,,,02EE,0FED:0FEF
1,436
Posted By balajesuri
1. Could you please show what you have tried? ...
1. Could you please show what you have tried?

2. Please understand that forum members may not have working knowledge of biology. So when you say, "Print out the number of occurrences for each...
1,200
Posted By balajesuri
| sed 's/\(\([0-9A-F][0-9A-F] \)\{4\}\)/\1\n/g'
| sed 's/\(\([0-9A-F][0-9A-F] \)\{4\}\)/\1\n/g'
1,266
Posted By balajesuri
grep -P -B 10 -A 9 'Status: ...
grep -P -B 10 -A 9 'Status: (?!Clear)' alarm.txt
Forum: Programming 07-25-2019
1,279
Posted By balajesuri
A more pythonic way ;) N =...
A more pythonic way ;)



N = int(input("Please enter number:"))
t = sum([int(input("Enter Numbers %d:" %i)) for i in range(1, N+1)])
print(t)
214
Posted By balajesuri
I think your set -x gives pretty clear idea that...
I think your set -x gives pretty clear idea that "srvctl config database...." is not having any output. So $STANDBY_CONF is empty.
May be you want to check by running this command directly on...
2,682
Posted By balajesuri
Best place to start is the AWK manual: The GNU...
Best place to start is the AWK manual: The GNU Awk User’s Guide (https://www.gnu.org/software/gawk/manual/gawk.html)
Then you need lot of patience, practice, reading forums like this one and think...
Forum: Programming 02-15-2019
836
Posted By balajesuri
You might want to start by reading the JAVA API...
You might want to start by reading the JAVA API documentation of File class:
File (Java Platform SE 7 ) (https://docs.oracle.com/javase/7/docs/api/java/io/File.html)
255
Posted By balajesuri
Few simple modifications: #!/bin/bash ...
Few simple modifications:



#!/bin/bash

VarSize=${1-5} # use $1 if defined, else set VarSize as 5
OptSize=${2-3} # use $2 if defined, else set OptSize as 3
HomeSize=${3-2} # use $3 if...
636
Posted By balajesuri
Or an interesting exercise would be to convert...
Or an interesting exercise would be to convert your script to run on bourne shell, so that it works on all shells. Would be quite insightful to do so :)
656
Posted By balajesuri
Do you have this module IO::Tty...
Do you have this module IO::Tty (https://metacpan.org/pod/IO::Tty) installed?
238
Posted By balajesuri
This looks like a config file (or ini file) that...
This looks like a config file (or ini file) that can be read by python's configparser module. Here's an attempt to comment out a section using python 3 interpreter.


import configparser

file =...
579
Posted By balajesuri
As per the OSX sed manual...
As per the OSX sed manual (https://ss64.com/osx/sed.html) (and the error message), you need to use a backslash and newline for a, i and c:
[1addr]i\
text
Write text to the...
376
Posted By balajesuri
Hello, what have you tried? :-) Here are...
Hello, what have you tried? :-)

Here are some pointers to help you get started:
1. ls -rt | tail -1 to get the last image.
2. Check if it's an image file (and not a dir or symlink, for instance)...
863
Posted By balajesuri
You can create a virtual stack in your mind and...
You can create a virtual stack in your mind and then read through the code. Everytime there's an if, you make a push; and everytime there's a fi, you make a pop from that virtual stack. At the end of...
Forum: Programming 03-09-2018
1,074
Posted By balajesuri
In a class, if you declare a method as static,...
In a class, if you declare a method as static, you need not instantiate the class to be able to use the method. So , in your program, the method change() is being called directly by qualifying it...
468
Posted By balajesuri
It could also be a good start to learn python...
It could also be a good start to learn python programming language and explore numpy (http://www.numpy.org/).
482
Posted By balajesuri
#! /usr/bin/zsh query="set pagesize 0...
#! /usr/bin/zsh

query="set pagesize 0 feedback off verify off heading off echo off;
select table_name, table_name1 from table;"

while read line
do
table_name=$(echo $line | awk '{print...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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