10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a file xyz with the following content
PPPL 0123
PPPL 0006
POFT 0923
POFT 1111
WENT 2323
SEND 2345
I also have another file named MasterFile where it contains the above mentioned data million times with different digits at the end for example some times it contains SEND 9999 or WENT... (4 Replies)
Discussion started by: knijjar
4 Replies
2. Shell Programming and Scripting
Hi.
In thread https://www.unix.com/shell-programming-and-scripting/267833-grouping-counting.html rovf and I had a mini-discussion on grep and awk.
Here is a demo script that compares the awk and grep approaches for this single problem:
#!/usr/bin/env bash
# @(#) s2 Demonstrate group... (1 Reply)
Discussion started by: drl
1 Replies
3. UNIX for Advanced & Expert Users
Hi,
I want to get the only application name from the server.
Ex:
if i give $ ps -ef | grep bw.
It will show all BW process with entire path. It will little confuse to list out the process. Can anyone have syntax to get only the instance name. I need this for be, hawk,ems also.
Please... (2 Replies)
Discussion started by: ckchelladurai
2 Replies
4. Shell Programming and Scripting
I want to write the syntax so does not count line with no space.
So currerntly it is showing lines as 5, but i want to show 4.
# cat /tmp/mediacheck | sort -u | grep -vi " " | awk '{print $1}' | wc -l
BA7552
BAA002
BAA003
BAA004 (6 Replies)
Discussion started by: Junes
6 Replies
5. Shell Programming and Scripting
I want to grep some information out of the dmidecode but when I type
dmidecode | grep Memory
I get several instances of the word. Is there a way I can just choose which instance I want to display? (8 Replies)
Discussion started by: jcnewton13
8 Replies
6. Shell Programming and Scripting
Hi all, i am new to unix scripting in ksh or any shell for that matter. I have downloaded a xml file from a website and saved on my local harddrive. inside the xml, the same tag is listed multiple times.
<title>Tonight</title>
<title>Thursday</title>
<title>Friday</title>... (6 Replies)
Discussion started by: scubasteve39
6 Replies
7. Shell Programming and Scripting
I need to be able to search for a beginning line header, then use grep or something else to get the very next instance of a particular string, which will ALWAYS be in "Line5". What I have is some data that appears like this:
Line1
Line2
Line3
Line4
Line5
Line6
Line7
Line1
Line2
...... (4 Replies)
Discussion started by: Akilleez
4 Replies
8. UNIX for Dummies Questions & Answers
hi!
i'm trying to get grep to do an exact match for the following pattern but..it's not quite working. I'm not too sure where did I get it wrong. any input is appreciated.
echo "$VAR" | grep -q '^test:]name'
if ; then
printf "test name is not found \n"
fi
on... (4 Replies)
Discussion started by: jazzaddict
4 Replies
9. AIX
Hi,
I am trying to grep a string which has two words separated by space.
I used a script to grep the string by reading the string in to a variable
command i used in the script is
echo "enter your string"
read str
grep $str <file>
it is working fine when the entered string is a single... (3 Replies)
Discussion started by: sekhar gajjala
3 Replies
10. Shell Programming and Scripting
I have this file (below) and need to get out specific data that appears after OSE1_1.FIX, but before OSE1_2.FIX.
Specifically I need to get all of the data after "ROW80_20:", "ROW80_21:", "ROW80_22:" & "ROW80_23:" then I need to do the same for data the appears after OSE1_2.FIX, but before... (2 Replies)
Discussion started by: josslate
2 Replies