12-04-2000
I am trying to write a script that when triggered by an ip address it will run the following
export DAVIDCOUNT=`(fgrep -ce 140.147.146.146 /export/home/ipconnect.txt) >> /local/cron/test_listen_out`;
I think this is my problem line.
What I like this line to do is when it sees the 140.147.146.146 ip address, it goes to the ipconnect.txt file, finds the line that corresponds to the ip address and print the whole line of text that has 140.147.146.146.
Is this possible?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I know this must be really easy, but i can't get it to work
I've got a perl script, with a file.
I want to print an empty line, and the following doesn't seem to work:
print nameoffile "\n"
thanks for your help!! (3 Replies)
Discussion started by: kfad
3 Replies
2. UNIX for Dummies Questions & Answers
I have a log file with several lines as follows:
Aug 30 06:35:08 trnwvltfit1 /usr/lib/snmp/snmpdx: Agent snmpd appeared dead but responded to ping
I am using the date of the line to determine which lines to print. However, I am only trying to print the parts of the line that are NOT... (4 Replies)
Discussion started by: Nysif Steve
4 Replies
3. Shell Programming and Scripting
Morning All,
Quite a simple one this, I hope. What I want to do is to re-write the first line of a file before it's sent to print. The line will be blank initially, and I want to insert some text. The operation can either be done on the file itself (modifying the file on disk), OR in a... (2 Replies)
Discussion started by: alexop
2 Replies
4. UNIX for Advanced & Expert Users
The below line gives the perfect output when I mention the record number and file name as hardcoded.
awk 'NR==3{print}' samp2.txt
But when I pass the record num and file name as variable, it doesn't give any output.
row_num=3;file2=samp2.txt;awk 'NR==$row_num {print}' $file2
Can you... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies
5. Shell Programming and Scripting
This is probably simple but I would like to print every line in a file 5 times like this:
awk 'NR' mens_csv.tab
Dub Tank 53%Hemp/42%Cotton/5%Lycra Jersey Dark Green 0 $22.50
Dub Tank 53%Hemp/42%Cotton/5%Lycra Jersey Indigo Blue 0 $22.50
---------------
Dub... (4 Replies)
Discussion started by: Autumn Tree
4 Replies
6. Shell Programming and Scripting
Hi,
I have a file in which the entries are of the following type:
5649 S 1
0412 S 0
0423 S 1
0020 N 0
0020 N 0
1022 S 1
1022 S 1
I need to print the whole line which is having 0 in the third column into a different file
Thanks... (6 Replies)
Discussion started by: swasid
6 Replies
7. UNIX and Linux Applications
Hi
I have a file having multiple lines. I want to print a particular line. How can I do this?
Thanks in advance
Ananth (5 Replies)
Discussion started by: Ananthdoss
5 Replies
8. Homework & Coursework Questions
Florida State University, Tallahassee, FL USA, Dr. Whalley, COP4342
1. The problem statement, all variables and given/known data:
Create a lex specification file that reads a C source program that ignores keywords and collects all identifiers (regular variable names) and also displays the line... (3 Replies)
Discussion started by: D2K
3 Replies
9. Shell Programming and Scripting
I need to develop a script where I will take two date arguments as parameter date1 and date2 which will in format YYYYMM.
Below is the input file say sample.txt.
sample.txt will have certain blocks starting with P1.
Each block will have a value 118,1:TIMESTAMP.
I need to compare the... (7 Replies)
Discussion started by: garvit184
7 Replies
10. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT DEBIAN
smpteframe
SMPTEFrame(3) libltcsmpte SMPTEFrame(3)
NAME
SMPTEFrame -
Raw 80 bit SMPTE frame.
SYNOPSIS
#include <ltcsmpte.h>
Data Fields
unsigned int frameUnits:4
unsigned int user1:4
unsigned int frameTens:2
unsigned int dfbit:1
unsigned int colFrm:1
unsigned int user2:4
unsigned int secsUnits:4
unsigned int user3:4
unsigned int secsTens:3
unsigned int biphaseMarkPhaseCorrection:1
unsigned int user4:4
unsigned int minsUnits:4
unsigned int user5:4
unsigned int minsTens:3
unsigned int binaryGroupFlagBit1:1
unsigned int user6:4
unsigned int hoursUnits:4
unsigned int user7:4
unsigned int hoursTens:2
unsigned int reserved:1
unsigned int binaryGroupFlagBit2:1
unsigned int user8:4
unsigned int syncWord:16
Detailed Description
Raw 80 bit SMPTE frame.
Definition at line 140 of file ltcsmpte.h.
Field Documentation
unsigned int SMPTEFrame::binaryGroupFlagBit1
Definition at line 160 of file ltcsmpte.h.
unsigned int SMPTEFrame::binaryGroupFlagBit2
Definition at line 168 of file ltcsmpte.h.
unsigned int SMPTEFrame::biphaseMarkPhaseCorrection
Definition at line 153 of file ltcsmpte.h.
unsigned int SMPTEFrame::colFrm
Definition at line 146 of file ltcsmpte.h.
unsigned int SMPTEFrame::dfbit
Examples:
tests/decoder.c.
Definition at line 145 of file ltcsmpte.h.
unsigned int SMPTEFrame::frameTens
Definition at line 144 of file ltcsmpte.h.
unsigned int SMPTEFrame::frameUnits
Definition at line 141 of file ltcsmpte.h.
unsigned int SMPTEFrame::hoursTens
Definition at line 166 of file ltcsmpte.h.
unsigned int SMPTEFrame::hoursUnits
Definition at line 163 of file ltcsmpte.h.
unsigned int SMPTEFrame::minsTens
Definition at line 159 of file ltcsmpte.h.
unsigned int SMPTEFrame::minsUnits
Definition at line 156 of file ltcsmpte.h.
unsigned int SMPTEFrame::reserved
Definition at line 167 of file ltcsmpte.h.
unsigned int SMPTEFrame::secsTens
Definition at line 152 of file ltcsmpte.h.
unsigned int SMPTEFrame::secsUnits
Definition at line 149 of file ltcsmpte.h.
unsigned int SMPTEFrame::syncWord
Definition at line 171 of file ltcsmpte.h.
unsigned int SMPTEFrame::user1
Definition at line 142 of file ltcsmpte.h.
unsigned int SMPTEFrame::user2
Definition at line 147 of file ltcsmpte.h.
unsigned int SMPTEFrame::user3
Definition at line 150 of file ltcsmpte.h.
unsigned int SMPTEFrame::user4
Definition at line 154 of file ltcsmpte.h.
unsigned int SMPTEFrame::user5
Definition at line 157 of file ltcsmpte.h.
unsigned int SMPTEFrame::user6
Definition at line 161 of file ltcsmpte.h.
unsigned int SMPTEFrame::user7
Definition at line 164 of file ltcsmpte.h.
unsigned int SMPTEFrame::user8
Definition at line 169 of file ltcsmpte.h.
Author
Generated automatically by Doxygen for libltcsmpte from the source code.
Version 0.4.4 Fri Apr 27 2012 SMPTEFrame(3)