10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies
2. Shell Programming and Scripting
Hello,
I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it.
I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies
3. Shell Programming and Scripting
My code is something like below.
#/bin/bash
for i in `ps -ef | grep pmon | grep -v bash | grep -v grep | grep -v perl | grep -v asm | grep -v MGMT|awk '{print $1" "$8}'`
do
echo $i
ORACLE_SID=`echo $line | awk '{print $2}'`
USERNAME=`echo $line | awk '{print $1}'`
done
=============
But... (3 Replies)
Discussion started by: tapia
3 Replies
4. Shell Programming and Scripting
Hi,
I have an input file like this
line1
line2
line3 hello unix how are you
This is what I am expecting my output to be
line1
line2
#line3 hello unix how are you
line3 hello (3 Replies)
Discussion started by: jacobs.smith
3 Replies
5. Red Hat
Hi,
In the following output you can see the the user "richard" is a member on the team/group "developers":
# id richard
uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers)
but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies
6. Shell Programming and Scripting
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies
7. Shell Programming and Scripting
Hello,
I am currently a little bit lost with my new shell-script.
I am trying to output the results of the "id"-command as a "one per line" statement. For example:
I have the user "test" with the group-memberships "group1, group2, group3". When I enter "id test" it will show me the output... (2 Replies)
Discussion started by: henryford
2 Replies
8. Shell Programming and Scripting
I've this file and need to sort the data in each group
File would look like this ...
cat file1.txt
Reason : ABC
12345-0023
32123-5400
32442-5333
Reason : DEF
42523-3453
23345-3311
Reason : HIJ
454553-0001
I would like to sort each group on the last 4 fileds and print them... (11 Replies)
Discussion started by: prash184u
11 Replies
9. Shell Programming and Scripting
Hi @ all
I'm trying to achive to this problem,
I've a 2-column composed file as the following:
192.168.1.2 2
192.168.1.3 12
192.168.1.2 4
192.168.1.4 3
cpc1-swan1-2-3-cust123.swan.cable.ntl.com 4
192.168.1.3 5
192.168.1.2 10
192.168.1.4 8... (8 Replies)
Discussion started by: m4rco-
8 Replies
10. Shell Programming and Scripting
how to print any required line by its line no using awk and its NR variable
for eg:
------------
121343
adfdafd
21213sds
dafadfe432
adf.adf%adf
---------------
requied o/p if give num=3 it print:
21213sds
-------------------------------------- (2 Replies)
Discussion started by: RahulJoshi
2 Replies