Search Results

Search: Posts Made By: balajesuri
29,574
Posted By balajesuri
Hello, what have you tried? Please read the forum...
Hello, what have you tried? Please read the forum rules (https://www.unix.com/misc.php?do=cfrules).


Also, quick hint did you try the "join" command?
106,553
Posted By balajesuri
Hint: find /path/to/search \( -iname '*.jpg' -o...
Hint:
find /path/to/search \( -iname '*.jpg' -o -iname '*.tif' \)
73,668
Posted By balajesuri
You may try perl. When it comes to regex and...
You may try perl. When it comes to regex and string parsing, perl handles them beautifully. Of course, doesn't mean you don't have other options.
6,986
Posted By balajesuri
if [[ $reply2 == "A" ]]; then Exe_Cmd_State ...
if [[ $reply2 == "A" ]]; then
Exe_Cmd_State
Analysis_Cmd_state
elif [[ $reply2 == "B" ]]; then
else
echo "Not valid Option"
fi


Don't the lines in red look shady to you? :D
Forum: Programming 03-16-2020
9,833
Posted By balajesuri
I see that "text" is basically a dictionary. So...
I see that "text" is basically a dictionary. So you can convert the object type from str to dict; loop over the keys and print only the key-value pairs you need.
4,296
Posted By balajesuri
Of course with -F flag: awk -F, '!a[$1]++' file
Of course with -F flag:
awk -F, '!a[$1]++' file
Forum: What is on Your Mind? 01-24-2020
15,905
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? 12-26-2019
12,846
Posted By balajesuri
...and learned a lot along the way :) Thanks for...
...and learned a lot along the way :) Thanks for the efforts.
5,500
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...
5,477
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
5,589
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
13,017
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...
7,316
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...
7,052
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
7,568
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...
5,466
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'
5,829
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
3,384
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)
3,515
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...
7,188
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
4,872
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)
2,347
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...
4,424
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 :)
5,365
Posted By balajesuri
Do you have this module IO::Tty...
Do you have this module IO::Tty (https://metacpan.org/pod/IO::Tty) installed?
1,730
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 =...
Showing results 1 to 25 of 500

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