Search Results

Search: Posts Made By: Skrynesaver
8,070
Posted By Skrynesaver
There really isn't enough information her to help...
There really isn't enough information her to help you...
Could you provide sample data?
Is this table a flat file or in a DB?
Have you mailx installed or what is your preferred mail command?
Have...
21,118
Posted By Skrynesaver
$ cat ~/tmp.dat Name , Company_Worked (Header) ...
$ cat ~/tmp.dat
Name , Company_Worked (Header)
Asley,IBM;Amazon;BOA;Google
King.Jr,Wipro;Microsoft;AMZ

$ perl -ne 'chomp;($name,$emp)=split/,/;for (split/;/,$emp){print "$name, $_\n";}'...
10,617
Posted By Skrynesaver
Negative values for peer inodes in ss -x output
Hi all,

Long time no see, love what you've done with the place, been a while and asked this in the wrong forum initially...

I'm wondering how to interpret negative values for local and peer...
10,521
Posted By Skrynesaver
Negative values for peer inodes in ss -x output
Hi all,

Long time no see, love what you've done with the place!

I'm wondering how to interpret negative values for local and peer inode values for Unix sockets?


Netid State Recv-Q...
3,700
Posted By Skrynesaver
Which shell are you using? I'm relying on a...
Which shell are you using?

I'm relying on a Bash convention here that anything inside $(( ...)) gets mathematically evaluated in the condidtion.
3,700
Posted By Skrynesaver
Hi Sadique, I left out a closing...
Hi Sadique,

I left out a closing parenthesis, I've also added full path to the stat command:

if [ $(( $(date +%s ) - $(stat -t ${PATH_TO_EXISTING_DIRECTORY}/$(ls -lrt...
3,700
Posted By Skrynesaver
So every 10 minutes, check the directory and if...
So every 10 minutes, check the directory and if the most recent file is greater than 10 minutes old send a mail with the subject "No new files seen since ${LATEST_FILE_TIMESTAMP}"

You can use cron...
5,399
Posted By Skrynesaver
you don't specify the scripting language, so I'm...
you don't specify the scripting language, so I'm going to assume you're using bash...

fileName="Device_manumodel_$( date +%Y%m%d%H%M).csv"
27,331
Posted By Skrynesaver
It is possible, there is a Power Shell build for...
It is possible, there is a Power Shell build for Linux available (on GitHubl (https://github.com/PowerShell/PowerShell))

However systemctl status postgresql is the preferred method to test the...
2,065
Posted By Skrynesaver
$ cat tmp.dat NEED="TEST=Name WORK=Ps DEL=let" ...
$ cat tmp.dat
NEED="TEST=Name WORK=Ps DEL=let"

$ perl -ne '@assignments=$_=~/(\w+=\w+)/g;}{print join("\n",@assignments);' tmp.dat
TEST=Name
WORK=Ps
DEL=let
$
2,402
Posted By Skrynesaver
That's a shell command ;) I can break it into...
That's a shell command ;) I can break it into digestible chunks if you wish

perl -ne ' #Call the Perl interpreter and iterate over every line in the files listed as arguments with...
2,402
Posted By Skrynesaver
[skrynesaver@busybox]$cat tmp.dat name,id,flag ...
[skrynesaver@busybox]$cat tmp.dat
name,id,flag
apple,1,Y
apple,2,N
mango,1,Y
mango,2,Y
[skrynesaver@busybox]$ perl -ne 'chomp;@r=split/,/; push @{$fields{$r[0]}},$r[1] if $r[2] eq "Y";}{for...
Forum: AIX 08-16-2017
8,192
Posted By Skrynesaver
visudo and add the user or, if you have an...
visudo and add the user or, if you have an administrative group (eg. wheel) add the user to the group with adduser $USERNAME wheel
1,627
Posted By Skrynesaver
How would you call Nessus on the command line to...
How would you call Nessus on the command line to scan a single IP and generate a report?
4,638
Posted By Skrynesaver
Hi Sunil, which OS and which release are you...
Hi Sunil,

which OS and which release are you using?

Could you paste the contents of the following files?

~/.vimrc
/usr/share/vim/vimrc
/etc/vimrc
2,131
Posted By Skrynesaver
perl -npi -e "s/^(\S+) (.+)/'\1' a2/"...
perl -npi -e "s/^(\S+) (.+)/'\1' a2/" tmp.dat
Forum: HP-UX 03-08-2017
3,613
Posted By Skrynesaver
(11.23) 11i v2 was released in 2003, and was...
(11.23) 11i v2 was released in 2003, and was EOL'd in December 2015

11i v3 will be supported up to 2020.
1,627
Posted By Skrynesaver
hn.rstrip("\n\r") in order to lose the new line...
hn.rstrip("\n\r") in order to lose the new line character
10,006
Posted By Skrynesaver
$ cat test.file 123andsomeothervalues with a...
$ cat test.file
123andsomeothervalues with a space at position 22
Not 123 but with the space
123 but no spacein the appropriate column

$ perl -npi.bak -e 's/^(123.{18}) /$1X/' test.file

$...
10,006
Posted By Skrynesaver
perl -npi.bak -e ' s/(123.{797}) /${1}X/' infile
perl -npi.bak -e ' s/(123.{797}) /${1}X/' infile
4,406
Posted By Skrynesaver
Has the target host changed recently (eg. been...
Has the target host changed recently (eg. been re-imaged, reinstalled or assigned a new IP)?
If so opening the .ssh/known_hosts file and removing the record for the previous host at that IP is safe,...
2,937
Posted By Skrynesaver
examine the /etc/profile file and see line 233,...
examine the /etc/profile file and see line 233, it seems that someone has written a bash_profile over /etc/profile (shopt is a bash shell builtin)
Forum: Red Hat 08-31-2016
4,551
Posted By Skrynesaver
There's a field in /etc/shadow which sets how...
There's a field in /etc/shadow which sets how many days before expiry the user is warned, however this warning is on logon and so will not work for rarely administered boxes.
chage -l root will give...
3,608
Posted By Skrynesaver
ssh user@host quota Or if querying other...
ssh user@host quota

Or if querying other users quotas (assuming you have the rights)
ssh me@host quota user
1,999
Posted By Skrynesaver
\1 holds the value of the first capture group on...
\1 holds the value of the first capture group on the lhs of a substitution

google sed capture groups for many detailed discussions
Showing results 1 to 25 of 500

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