Sponsored Content
Full Discussion: Cat/File Descriptor Question
Homework and Emergencies Homework & Coursework Questions Cat/File Descriptor Question Post 302993034 by Don Cragun on Monday 6th of March 2017 03:00:33 AM
Old 03-06-2017
Assuming that the file memo is a non-empty text file containing:
Code:
1
3
5
6
4
2

and that there is no file named none, what output would you expect to get in the files named save1, save2, and letter if you were to run the pipeline:
Code:
cat memo none 2>save1 | sort - none 2>save2 > letter

? If you then actually run this pipeline with the input files set up as described above, did you get the output you expected? If not, what did you get and what did you expect to get?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File Descriptor Help

What is a file descriptor in Unix?? How to find a file descriptor of a file in Unix?? Does it have anything to do with the Inode numbers?? (3 Replies)
Discussion started by: rahulrathod
3 Replies

2. Programming

A small question about file descriptor

Can any body tell me when I put close(2), why the code does not show any out put? #include <stdio.h> #include <fcntl.h> #include <errno.h> int main(){ int fd1,fd2,fd3,fd4; close(2); fd1=open("test1.txt",O_WRONLY |O_CREAT | O_TRUNC,0744); fprintf(stderr,"fd1 = %d\n",fd1); ... (5 Replies)
Discussion started by: mlhazan
5 Replies

3. Shell Programming and Scripting

File Descriptor

Hello All, Im opening a file desciptor in perl and sending data using print CMD "$xyz". is there a limit to the length of the string that I can give to this CMD at a time. (3 Replies)
Discussion started by: rimser9
3 Replies

4. UNIX for Dummies Questions & Answers

File Descriptor

Hi What the below path contains? /proc/<pid>/fd (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

5. Shell Programming and Scripting

Question regarding cat command

Hello Friends, I have a question, i am trying to write a shell script in the bash shell. #!/bin/sh NAWK=/bin/nawk AWK=/bin/awk FIX_XML_PATH=/home/administrator/testfix/fix/ Y=`ls $FIX_XML_PATH | grep xml` echo $Y cat $Y in this case when i do the echo $Y command it gives me the... (11 Replies)
Discussion started by: asirohi
11 Replies

6. OS X (Apple)

Question about cat and echo

Hello, I am trying to send text to a USB to serial adaptor and then to an external speech synthesizer. I tried using the cat and echo commands with no luck. I have gotten some audio output from my synthesizer using Kermit a terminal emulator, so I am pretty sure my synthesizer and my USB to serial... (1 Reply)
Discussion started by: jamesapp
1 Replies

7. Shell Programming and Scripting

Easy cat question

I am having problems getting a list of filenames that I want from a directory. example: I have 3 files - filename.xxx.20110505.123030 filename.yyy.20110505.123030 filename.zzz.20110505.123030 There may be multiple xxx,... (3 Replies)
Discussion started by: Drenhead
3 Replies

8. Shell Programming and Scripting

cat question

Can any one guide me how can i accomplish this by script i continuously receive files via our ftp server into a certain folder is there a way i can take those files cat it to a new file by hour and create a new file when new hour starts? (4 Replies)
Discussion started by: shehzad_m
4 Replies

9. UNIX for Dummies Questions & Answers

Question regarding Cat

Can we concatenate say, I have a few files prefixing with 2009... So now i want all the 2009 files into one single file.. Can this be achieved???? (4 Replies)
Discussion started by: saggiboy10
4 Replies

10. Shell Programming and Scripting

cat question

hello! why this works? cd /home/user cat * | ecasound -i stdin -o jack and this doesn't? cd /home/user/somedirectory cat * | ecasound -i stdin -o jack somedirectory are full with exe files which are the best source for this sort of noise thing (10 Replies)
Discussion started by: karlhungus
10 Replies
MIBHELP(1)							       mrtg								MIBHELP(1)

NAME
mibhelp - A Table of some interesting OIDs OVERVIEW
This File Contains a collection of interesting MIB Entries ... mrtg knows about their names ... depending on the ASN.1 Syntax you may have to put gauge into the Options[]: parameter. For information about how to create a Target[]: parameter which references these MIB entries, please consult the reference manpage. MIB LIST
ifOperStatus Descriptor: ifOperStatus Identifier: 1.3.6.1.2.1.2.2.1.8 ASN.1 Syntax: INTEGER Enumeration: up 1, down 2, testing 3 The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. ifAdminStatus Descriptor: ifAdminStatus Identifier: 1.3.6.1.2.1.2.2.1.7 ASN.1 Syntax: INTEGER Enumeration: up 1, down 2, testing 3 The current administrative state of the interface. The testing(3) state indicates that no operational packets can be passed. ifInOctets Descriptor: ifInOctets Identifier: 1.3.6.1.2.1.2.2.1.10 ASN.1 Syntax: Counter32 The total number of octets received on the interface, including framing characters. ifInUcastPkts Descriptor: ifInUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.11 ASN.1 Syntax: Counter32 The number of subnetwork-unicast packets delivered to a higher-layer protocol. ifInNUcastPkts Descriptor: ifInNUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.12 ASN.1 Syntax: Counter32 The number of non-unicast (i.e., subnetwork- broadcast or subnetwork-multicast) packets delivered to a higher-layer protocol. ifInDiscards Descriptor: ifInDiscards Identifier: 1.3.6.1.2.1.2.2.1.13 ASN.1 Syntax: Counter32 The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. ifInErrors Descriptor: ifInErrors Identifier: 1.3.6.1.2.1.2.2.1.14 ASN.1 Syntax: Counter32 The number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. ifInUnknownProtos Descriptor: ifInUnknownProtos Identifier: 1.3.6.1.2.1.2.2.1.15 ASN.1 Syntax: Counter32 The number of packets received via the interface which were discarded because of an unknown or unsupported protocol. ifOutOctets Descriptor: ifOutOctets Identifier: 1.3.6.1.2.1.2.2.1.16 ASN.1 Syntax: Counter32 The total number of octets transmitted out of the interface, including framing characters. ifOutUcastPkts Descriptor: ifOutUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.17 ASN.1 Syntax: Counter32 The total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent. ifOutNUcastPkts Descriptor: ifOutNUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.18 ASN.1 Syntax: Counter32 The total number of packets that higher-level protocols requested be transmitted to a non- unicast (i.e., a subnetwork-broadcast or subnet- work-multicast) address, including those that were discarded or not sent. ifOutDiscards Descriptor: ifOutDiscards Identifier: 1.3.6.1.2.1.2.2.1.19 ASN.1 Syntax: Counter32 The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmit- ted. One possible reason for discarding such a packet could be to free up buffer space. ifOutErrors Descriptor: ifOutErrors Identifier: 1.3.6.1.2.1.2.2.1.20 ASN.1 Syntax: Counter32 The number of outbound packets that could not be transmitted because of errors. ifOutQLen Descriptor: ifOutQLen Identifier: 1.3.6.1.2.1.2.2.1.21 ASN.1 Syntax: Unsigned32 The length of the output packet queue (in packets). frInOctets From: Simon Ferrett <simonf@world.net> 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9' 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7' which when used in the form: frInOctets.pp.dd&frOutOctets.pp.dd:community@cisco.router where pp is the physical port that the frame relay pvc is defined on and dd is the DLCI of the pvc gets you the in and out octets for just that pvc. ifAdminHack and ifOperHack The return values of ifAdminStatus and ifOperStatus are not very usefull for graphing. Use ifOperHack and ifAdminHack instead. They return 1 for UP and 0 otherwise. Note these are not real MIB entities but mrtg hacks AUTHOR
Tobias Oetiker <oetiker@ee.ethz.ch> 3rd Berkeley Distribution 2.9.17 MIBHELP(1)
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy