9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. 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
3. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
4. Shell Programming and Scripting
I have a file that I need to find each interface that has move-group on the interface line and print this line if the lines under the interface does Not have "filter-shared 14".
Example file:
interface 1/1/1/0 move-group
decription one one one zero
no shut
filter-shared 14... (21 Replies)
Discussion started by: numele
21 Replies
5. UNIX for Dummies Questions & Answers
I have this output from a loop
a11
1,2
3,4
5,6
7,8
12,8
5,4
3,6
a12
10,11
12,13
15,18
20,22
a13
... (3 Replies)
Discussion started by: maryre89
3 Replies
6. Shell Programming and Scripting
Greetings All,
I would like to find all occurences of a pattern and delete a substring from the all matching lines EXCEPT the first. For example:
1234::group:user1,user2,user3,blah1,blah2,blah3
2222::othergroup:user9,user8
4444::othergroup2:user3,blah,blah,user1
1234::group3:user5,user1
... (11 Replies)
Discussion started by: jacksolm
11 Replies
7. Shell Programming and Scripting
Hi,
i am using a variable tmpVar, using variable data i need implement for loop
tmpVar="abc bbc cbc nbc mbc" # valiable having total number of words= 5 so i need to loop 5 times.
tmpVar="abc bbc cbc nbc mbc"
tmpcnt=`echo $tmpVar|wc -w`
for cnt in 1..$tmpcnt
do
t1=`echo... (4 Replies)
Discussion started by: onesuri
4 Replies
8. Shell Programming and Scripting
I have a output log file, that I want to extract some temperature measurement data.
I want to AWK on the words "show chassis environment" in the original file, and extract that entire line, and then the 3rd to 10th lines after the one I AWK'd, into a seperate output file.
Here is an example... (3 Replies)
Discussion started by: HikerLT
3 Replies
9. Shell Programming and Scripting
Hi,
I am unable sum of each column in the loop usng awk command.
Awk is not allowing the parameters in the command.
i am facing the below error.
awk: 0602-562 Field $() is not correct.
Source file
abc.txt
100,200,300,400,500,600,700,800,900
101,201,301,401,501,601,701,801,901
... (1 Reply)
Discussion started by: number10
1 Replies