Search Results

Search: Posts Made By: balu1234
4,239
Posted By balu1234
Compare two files and print output
Hi All,

i am trying to compare two files in Centos 6.

F1: /tmp/d21

NAME="xvda" TYPE="disk" SIZE="40G" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT=""
NAME="xvda1" TYPE="part"...
5,451
Posted By balu1234
Hi All, Can someone explain the meaning of...
Hi All,

Can someone explain the meaning of the below statement.

awk 'FNR==NR{f1[$2]=$0;next} $1 in f1 {print $0, f1[$1]}' FS='"' FILE FS=' ' FILE1
3,822
Posted By balu1234
Printing network details
Hi ALL,

I am trying to collect and print all the network interface details in linux shell script.
operating system : centos 7

Below is my shell script :


#!/usr/bin/env bash
for i in $(ip...
5,235
Posted By balu1234
yes now i am getting required ouput. Thanks...
yes
now i am getting required ouput.
Thanks so much for your help Rudic and vgersh99 .
5,235
Posted By balu1234
thanks vgersh99 i am using nawk now but i am...
thanks vgersh99 i am using nawk now but i am getting each line output three times as well as it's missing double quotes in some places


{"NAME":"QLogic 570x/571x Gigabit Ethernet Driver...
5,235
Posted By balu1234
Hi Rudic, Thanks for the reply, But when i...
Hi Rudic,

Thanks for the reply, But when i am trying to executing the script it's repeating each line output three times as well as it's missing double quotes in some places


{"NAME":"QLogic...
5,235
Posted By balu1234
Convert rows to column and print output in required format
Hi All,

i am trying to print the solaris 11 packages in below required format, But i am unable to do that.

Current ouput :

root@abc# pkginfo -l | egrep '(BASEDIR|NAME|VERSION)' | awk...
5,056
Posted By balu1234
Application server is running or not
Hi All,

i am trying to find whether nginx is installed or not as well process is running or not on my centos server.

For that i am searching for the nginx configuration file nginx.conf based on...
5,451
Posted By balu1234
Compare two files and print based on common variable value.
Hi All,

i have below two files.

FILE:

NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root" GROUP="disk" MODE="brw-rw----" PKNAME="" MOUNTPOINT=""
NAME="/dev/sda1" TYPE="part" SIZE="500M"...
3,988
Posted By balu1234
Printing the user and group info
Hi All,

i want to collect all the users info whose id greater than 999 and print the groups information which they belong.

example :

for user in $(cut -d: -f1,3 /etc/passwd | egrep...
8,015
Posted By balu1234
Thanks all for sharing the information. now...
Thanks all for sharing the information.

now i am able to get the required output.
Output :

mounted:"/boot" type:"part" file_system:"/dev/sda1"

mounted:"/" type:"lvm"...
8,015
Posted By balu1234
Reading a file line by line and print required lines based on pattern
Hi All,

i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.

i am using centos 7 Operating system.
...
5,204
Posted By balu1234
How to print multiple required columns dynamically in a file using the header name?
Hi All,

i am trying to print required multiple columns dynamically from a fie.
But i am able to print only one column at a time.
i am new to shell script, please help me on this issue.

i am...
70,138
Posted By balu1234
Hi Andrew, Thanks for your response. ...
Hi Andrew,

Thanks for your response.

CentOS Linux 7 is my operating system.

i installed jq pkg on my server.

i tried below command:

# jq -s -R '[[ split("\n")[] | select(length > 0) |...
70,138
Posted By balu1234
How to convert any shell command output to JSON format?
Hi All,

I am new to shell scripting, Need your help in creating a shell script which converts any unix command output to JSON format output.
example:
sample df -h command ouput :

Filesystem ...
Showing results 1 to 15 of 15

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