Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: rbatte1
699
Posted By Chubler_XL
In general you would use VAR=$( command ) to...
In general you would use VAR=$( command ) to capture the output of each command and then echo your result at the end like this:

#!/bin/bash

if [ $# -eq 1 ]
then
filename="/home/marco/$1"...
1,281
Posted By nezabudka
Ok, The right time to learn how to use the...
Ok, The right time to learn how to use the '--debug' option?
sort -k3nr --debug <<<"Server1 not found 1025 MAJOR some info here"
sort: text ordering performed using simple byte comparison
sort:...
1,276
Posted By Peasant
You can untar without the actual copy to host : ...
You can untar without the actual copy to host :

ssh user@host "cd /existing_folder_you_wish_to_untar_to && tar -xvf -" < mytar.tar


Regards
Peasant.
1,417
Posted By RudiC
Not sure this works with all tr versions: ...
Not sure this works with all tr versions:


echo "HiringManager_RHMC, DirectSupervisor_RHMC, ProcessServerReadAccess_ST" | tr -s ', ' '\n'
HiringManager_RHMC
DirectSupervisor_RHMC...
2,038
Posted By MadeInGermany
%06s is obviously not portable. On different OS...
%06s is obviously not portable.
On different OS I get different results:
printf "%06s\n" 01140
01140printf "%06s\n" 01140
001140However, never this is seen as a number.

--- Post updated at...
1,663
Posted By sagar_1986
awk '/start/{flag=1} flag; /end/{flag=0}'...
awk '/start/{flag=1} flag; /end/{flag=0}' sample.txt awk '/start/,/123456/,/end/' sample.txt
sed '/start.*123456.*end/!d' sample.txt
sed -n '/start.*123456.*end/p' sample.txt
sed -e...
10,242
Posted By RudiC
You want the 3rd (...) newest file? Try NOT...
You want the 3rd (...) newest file? Try NOT reversing the sorting order
ls -lt *.conf | sed -n "${1}p"
1,894
Posted By Scrutinizer
Here are some more alternatives to try: Use...
Here are some more alternatives to try:

Use a here string
read var1 var2 <<< "$(openstack hypervisor stats show | awk -F'|' 'NR==14{print $2,$3}')"
Use a here document
read var1 var2 << EOB
...
1,894
Posted By Chubler_XL
the first < is a standard input redirection and...
the first < is a standard input redirection and causes input to the read command to come from a file.

The second part is process substitution witch takes the format of <(list). The value list...
Forum: What is on Your Mind? 01-24-2020
5,489
Posted By Neo
Moderators of the Year 2019 - Ravinder Singh and Victor Berridge
Today, I am very pleased to announce that the Moderator of the Year Award, 2019 has two very deserving winners.

Ravinder Singh (RavinderSingh13) and Victor Berridge (vbe)

Victor (vbe) has...
8,065
Posted By nezabudka
Hi You can use the -V option sort -V or...
Hi
You can use the -V option
sort -V
or even sort right away in a file
vim -nes +'%!sort -V' +wq file
5,876
Posted By Peasant
I've seen this mostly related to DNS query...
I've seen this mostly related to DNS query timeouts setup from client side.
The defaults are quite high on most linux/unix operating system, from AIX man page online :


In practice if you have,...
1,572
Posted By RudiC
OK; give it a shot and report back the errors...
OK; give it a shot and report back the errors and/or shortfalls you encounter.
1,372
Posted By vbe
This reminds me of silly situations I found...
This reminds me of silly situations I found myself from time to time... when a server goes wrong and at reboot, needs manual instruction to continue to boot, only when it happens it looses its...
6,298
Posted By MadeInGermany
[Tip] ptree for Linux
Unix (and Linux) uses a process tree that gives a natural security, by simple inheritance of attributes.

The following ptree script shows it. It runs on all Linux flavors.
Mostly useful for...
3,409
Posted By RudiC
Difficult to believe with unmodified input files....
Difficult to believe with unmodified input files. Pls report back your findings.


A regex using "alternation" as brought into play in rbatte1's post #4 will be the most efficient approach, as...
3,409
Posted By RudiC
Nice approach indeed! Could be curtailed to ...
Nice approach indeed!
Could be curtailed to
sed -r "/'($(paste -sd\| file2))'/s/^C//" file1, including the item list file as well.
Forum: What is on Your Mind? 01-01-2020
1,270
Posted By RavinderSingh13
Happy New Year 2020 to all :)
Hello All,

I would like to wish A very Happy New Year 2020 to all. May GOD bless all of us with TRUE knowledge, wisdom, great attitude, honesty, hard working capability, great health :b:

Cheers...
3,306
Posted By jim mcnamara
MicroFocus COBOL is your very best ORACLE option....
MicroFocus COBOL is your very best ORACLE option. It specializes in supporting ORACLE db's. It also is highly compatible with mainframe COBOL.
This will be the relatively easy part, moving code...
6,583
Posted By RudiC
A few comments allowed? The way you programmed...
A few comments allowed?
The way you programmed your script might not be the best use of resources:

for i in `cat file1` # useless use of cat, may fail on spaces in...
2,749
Posted By drl
Hi. All in a single perl code: extraction of...
Hi.

All in a single perl code: extraction of rightmost 2 digits, omit any containing lines greater than 33, numerically sort left-over lines based on right-most 2 characters:
#!/usr/bin/env perl...
2,801
Posted By MadeInGermany
Only match 443 or 9443, most simple as ERE (egrep...
Only match 443 or 9443, most simple as ERE (egrep or grep -E)
egrep '^Listen[[:blank:]]+9?443$'
Using a Posix character class rather than a GNU \s
2,527
Posted By Scrutinizer
Hi, the reason that the script is so slow, is...
Hi, the reason that the script is so slow, is that it is firing off 12 different sub shells per line in the input file, so that is 12 million sub shells in total, which is quite costly.
Examples of...
Forum: What is on Your Mind? 12-18-2019
5,965
Posted By Neo
UNIX.com End of Year (EOY) Report (2019)
Here is a quick EOY report for 2019.

2019 has been a year of "downward trend reversal" for UNIX.com. In fact, if we compare total Google search impressions from the peak days in December 2019...
6,988
Posted By Peasant
For DIY ... you can get a small ARM board with...
For DIY ... you can get a small ARM board with sim slot with linux installed.
Buy a sim card or make a contract, like for regular phone.

Using opensource software such as Gammu...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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