Search Results

Search: Posts Made By: as7951
40,303
Posted By as7951
Thank you Peasant, Achieved the solution by...
Thank you Peasant,

Achieved the solution by another way..
added "PROMPT_COMMAND='history -a >(tee -a ~/.bash_history | logger -t "$USER[$$] $SSH_CONNECTION")'" in /etc/profile and getting logs...
40,303
Posted By as7951
Issue with Bash Audit Command Logger script | Need help to debug this
Hi Experts,

Request your support
These are step for Bash Audit Command Logger.

I am running below script following below steps.
But the issue is i am not able to generate "userlog.info" file...
Forum: Programming 08-11-2019
12,174
Posted By as7951
Python script to run multiple command and append data in output csv file
Experts,
I am writing a script and able to write only small piece of code and not able to collect logic to complete this task.

In input file have to look for name like like this...
Forum: Programming 08-04-2019
18,837
Posted By as7951
Python Paramiko multi threading to capture all output for command applied in loop
My issue :
I am getting only last command output data in ouput file. Though comamnd "print(output)" displays data for all 3rd column values but the data saved in file is not what required it hs to...
Forum: Programming 08-02-2019
11,463
Posted By as7951
Hi Corona688, %s will put the device IP...
Hi Corona688,

%s will put the device IP after "outputcommand" to which we have logged in to collect data
%i is the i argument passed into function(my function). I contains list of Ip's taken...
Forum: Programming 08-02-2019
11,463
Posted By as7951
creating separate output file for each input file in python
Experts,
Need your help for this. Please support

My motive is to create seperate output file for each Input Files(File 1 and File2) in another folder say(/tmp/finaloutput)

Input files

File...
4,745
Posted By as7951
Hi Chubler_XL, Thank you very much.. ...
Hi Chubler_XL,

Thank you very much..
Really appreciate your help.
Got the expected output.
4,745
Posted By as7951
@chubler_XL....with you code i am getting below 6...
@chubler_XL....with you code i am getting below 6 row data from which mentioned below one row data(9K1,A5,B5,C5)is missing instead of this in output i am getting row with value 9K1,A5
Could you...
4,745
Posted By as7951
Hi @Scrutinizer.. issue is, in output file each...
Hi @Scrutinizer.. issue is, in output file each line has to start with string containing 9K like below .

GL_0BC_901_1AG_A_CASR9KTR176,BGL_KMR_919_1AC_B_CASR920R899...
4,745
Posted By as7951
Script to find string based on pattern and search for its corresponding rows in column
Experts,
Need your support for this awk script.

we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but...
Forum: Programming 07-16-2019
27,430
Posted By as7951
Python script to grep fields and use values from file 1 as argument for another command
Hi Experts,
I am working one one python script in version 3.x and 2.6. Need your support to complete it
Basically for both commands i have telnet to device and run command and then receiving input...
Forum: Programming 07-04-2019
14,977
Posted By as7951
Python or Shell script to Grep strings from input file and output in csv format
Hi Experts,

I am writing a python script to grep string from file and display output in csv file as in attached screenshot

https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view...
4,780
Posted By as7951
Hi Bakunin, Thanks for the detailed...
Hi Bakunin,

Thanks for the detailed information.

Your response helped me lot to gain knowledge on this topic/issue

Yes you are right, there are other ways as well to undo the changes i have...
4,780
Posted By as7951
Prevent user from creating new user from his login
Hi All,

Thank you very much for your time and effort you have put in for this post.
Your response and positive comments values a lot for me.

I tried the below to achieve what i want to some...
4,780
Posted By as7951
Hi Jim, i want to create one user and do not...
Hi Jim,

i want to create one user and do not want that user to run userdel and useradd command.
Only intention is to prevent user from running useradd and userdel commands only on Redhat 7.2...
4,780
Posted By as7951
Prevent user from creating new user from his login
Hi Experts,

Need your support
Redhat 6.5
I want to create a user with all(read, write, execute) privileges except that user should not be able to create any new user from his login
to perform...
12,916
Posted By as7951
Hi cero, Could you please help as how can i...
Hi cero,

Could you please help as how can i perform addition in below code:

sqlplus -s arbor/arbor123@FXADMUAT << EOF> CN_DN1.txt
set trimspool on heading off
set linesize 30000
SET WRAP OFF...
12,916
Posted By as7951
Hi Cero, Thank you for your quick response. ...
Hi Cero,

Thank you for your quick response.

I have tried the second option and used below in shell script.

set colsep ^
set heading off
set feedback off
set linesize 1000
set pagesize 0...
12,916
Posted By as7951
Shell script to execute sql query.
Hi Experts,

Need your support.
Not able to use sql query alias in shell script.

Could you please help me in finding right way to use alias with sql query in shell script.

Below is the code...
2,420
Posted By as7951
Hi RavinderSingh13, Now getting required...
Hi RavinderSingh13,

Now getting required output with below

awk -F"|" 'FNR==1{print $0;next}(($5-($1*$3))>=-2) && (($5-($1*$3))<=2){next} {print $0 " is bad, line number " FNR}' OFS="|" a1.txt
2,420
Posted By as7951
Hi RavinderSingh13, Your code is working,...
Hi RavinderSingh13,

Your code is working, but not showing error for last 2 rows

How to handle if a file has rows in thousands or in lakhs

Input file

a|b|c|d|e
2.4||3.5||6.6
5||50||249...
2,420
Posted By as7951
Hi RavinderSingh13, Your code only returning...
Hi RavinderSingh13,

Your code only returning below header

a||b||e
2,420
Posted By as7951
Hi Rudic, For the below row, multiplication...
Hi Rudic,

For the below row, multiplication result of $1 * $3 is equal to $5, so i should not get an error message, but im getting with your code
Error should display only for the bad records...
2,903
Posted By as7951
awk script to append suffix to column when column has duplicated values
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2

Scenario 1
i need to do below changes only when column1 is CR...
2,420
Posted By as7951
Hi Rudic, By using the below code getting...
Hi Rudic,

By using the below code getting below wrong error code output
As multiplication result of $1*$3 is correct in $5. So i should not supposed to get error.
but still it is showing output...
Showing results 1 to 25 of 67

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