12-05-2012
It's amazing to watch a quick (if complex) command being unravelled, I wish I had access to bakunin's mind when I was learning to use the shell
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is
sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM"
sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM"
sh "nlshCMD 'STREAM <job name3>' |... (0 Replies)
Discussion started by: bosskr
0 Replies
2. HP-UX
Hello,
I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is
sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM"
sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM"
sh "nlshCMD 'STREAM <job name3>' |... (1 Reply)
Discussion started by: bosskr
1 Replies
3. UNIX for Dummies Questions & Answers
Hi everybody..
I need to enter in bash mode and then run a command and this just in a single command line.
I tried : "bash ^M| somecommand" but nothing..
How do I do to simulate the return button just right after the bash command ?
Thanks.. (8 Replies)
Discussion started by: Riddick61
8 Replies
4. Shell Programming and Scripting
Hi
I want to display "echo command value in loop" in single line. My requirement is to show the input file (test_1.txt) like the output file (test_2.txt) given below.
Input file :test_1.txt
a1|b1|4|5
a1|b1|42|9
a2|b2|32|25
a1|b1|2|5
a3|b3|4|8
a2|b2|14|6
Output file:test_2.txt... (2 Replies)
Discussion started by: sakthifire
2 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
Can You Please let Know How use unix uniq command on a single column for deleting records from file
with Below Structure.Pipe Delimter File .
Source
Name | Account_Id
A | 101
B... (2 Replies)
Discussion started by: anudeepkumar123
2 Replies
6. Shell Programming and Scripting
HTML Code
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (2 Replies)
Discussion started by: rehantayyab82
2 Replies
7. Shell Programming and Scripting
HTML Code:
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (0 Replies)
Discussion started by: rehantayyab82
0 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
9. UNIX for Beginners Questions & Answers
Hello Experts,
I have a log file that contains 4 different type of exception :
1- Exception
2- Fatal
3- Error
4- Exec
My requirement is to find count of each type of exception, i tried using combination of -E and -C but that doesn't seems to be working :
grep -ec 'Exception' -ec... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output
Here is how my file looks like
1.1.1.1
1.1.1.2
1.1.1.3
1.1.2.1
1.1.2.2
1.1.3.1
1.1.3.2
1.1.3.3
1.1.3.4
So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
LEARN ABOUT FREEBSD
watch
WATCH(8) BSD System Manager's Manual WATCH(8)
NAME
watch -- snoop on another tty line
SYNOPSIS
watch [-cinotW] [-f snpdev] [tty]
DESCRIPTION
The watch utility allows the user to examine all data coming through a specified tty using the snp(4) device. If the snp(4) device is not
available, watch will attempt to load the module (snp). The watch utility writes to standard output.
The options are as follows:
-c Reconnect on close. If the tty observed by watch is closed, automatically reattach to the same tty. If this option is not speci-
fied, watch will request a new tty if running in interactive mode or exit if running without a controlling tty.
-f snpdev
If this option is specified, watch will use snpdev as the snp(4) device. Without this option, watch will attempt to find the next
available snp(4) device.
-i Force interactive mode. Interactive mode is a default if watch is started from a tty. If output is redirected to a file, interac-
tive mode can still be requested by specifying this option.
-n Disable the ability to switch the watched tty interactively. This disables both change requests made with <control-X> as well as
automatic prompting when the current tty is closed or overflows. In all cases where a prompt would be displayed, watch will exit.
The reconnect flags are unaffected by this option. When this flag is used, <control-X> is passed through to the terminal.
-o Reconnect on overflow. The behavior of watch if the observed tty overflows is similar to the behavior if the observed tty is closed.
For more info see snp(4).
-t Print the date and time when observation of a given tty is started.
-W Allow write access to observed tty.
tty Tty may be specified as a tty-style device, such as a pseudo tty device, a virtual console, or a serial line, etc. Names may be pre-
ceded by /dev/.
OPERATION
While running in interactive mode, all user input is discarded except for:
<control-G>
Exit watch.
<control-W>
Clear screen.
<control-X>
Change attached tty, unless this feature is disabled, in which case control-X is passed to the terminal as with other control charac-
ters.
SEE ALSO
pty(4), sio(4), snp(4), kldload(8)
HISTORY
The watch utility first appeared in FreeBSD 2.1.
AUTHORS
Ugen J.S. Antsilevich <ugen@NetVision.net.il>
BUGS
No terminal emulation is performed. All user output is reproduced as-is.
BSD
November 24, 2001 BSD