12-07-2010
sorry for the late reply
if i change the lines a bit to make it easier
Before
line one:
@@@@,@@@@@,-----,-----,------,------,------,-----,------
line two:
!!!!,!!!!!!,^^^,^^^,^^^,^^^,^^^,^^^,^^^^^
after the swtich
line one:
@@@@,@@@@@,^^^,^^^,^^^,^^^,^^^,^^^,^^^^^
line two:
!!!!,!!!!!!,-----,-----,------,------,------,-----,------
i am looking for a way that i could just go
swtich ! @and it would swrtich
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a log file (say log.txt). I have to search for a line which has the string ( say ERROR) in the log file and copy 15 lines after this into another file (say error.txt). Can someone give me the code and this has to be in PERL
Thanks in advance
Ammu (3 Replies)
Discussion started by: ammu
3 Replies
2. Shell Programming and Scripting
Hello,
Did anyone know how to write a perl script to merge the multi-line into a single line where each line with start at timestamp
Input-->
timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc; (5 Replies)
Discussion started by: happyday
5 Replies
3. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
4. Programming
I have datafile like
~dta.yunm
shhshsgggssssjsksjs
sggsjshsjsjssss
shshshhshshshs
i wish to take only first line and all other lines in concatenated form in second line what should I do???
output like
~dta.yunm
shhshsgggssssjsksjssggsjshsjsjssssshshshhshshshs
please tell me how... (7 Replies)
Discussion started by: sujit_singh
7 Replies
5. Shell Programming and Scripting
Unix box server version
***********
>uname -r
B.11.00
>echo $SHELL
/usr/bin/ksh
--> in this server, I have the path like /IMbuild/dev/im0serv1
---> in that directory I have the folders startup(.jsp files nearly 100 jsp's ) and scripts(contains .js files nearly 100 files) ... (9 Replies)
Discussion started by: pasam
9 Replies
6. Shell Programming and Scripting
Hi everybody,
First I apologize if my question seems demasiad you silly, but it really took 4 days struggling with this, I looked at books, forums ... And Also ask help to a friend that is software developer and he told me that it is a bad idea do it by perl... but this is my problem.
I moved to... (8 Replies)
Discussion started by: Thelost
8 Replies
7. Shell Programming and Scripting
Hi All
I have a .csv file which is showing data as
ESP Client,ESP Engagement,Misc_Projects_120101,DEFAULT,HA,Unknown,No,Unknown,201704,4.1,Unknown,AAA,Collected-Done,"she,joy.",200111,Unknown,Full Time,,Delivery_DONE AMO,Approved,2012-12-03,2012-12-06,2012-12-06,"Occupied Hours ... (7 Replies)
Discussion started by: adisky123
7 Replies
8. Shell Programming and Scripting
Hi Experts,
Would really appreciate if anyone can guide me how to compare two pdf files line by line and report the difference to another file. (3 Replies)
Discussion started by: prasanth_babu
3 Replies
9. Shell Programming and Scripting
In the below perl code I am using tags within each line to extract certain information. The tags that are used are:
STB >0.8 is STRAND BIAS otherwise GOOD
FDP is the second number
GO towards the end of the line is read into an array and the value returned is outputed, in the first line that... (1 Reply)
Discussion started by: cmccabe
1 Replies
10. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
BK(4) Kernel Interfaces Manual BK(4)
NAME
bk - line discipline for machine-machine communication (obsolete)
SYNOPSIS
Not currently supported under 2.11BSD
DESCRIPTION
This line discipline provides a replacement for the old and new tty drivers described in tty(4) when high speed output to and especially
input from another machine is to be transmitted over a asynchronous communications line. The discipline was designed for use by the Berke-
ley network. It may be suitable for uploading of data from microprocessors into the system. If you are going to send data over asynchro-
nous communications lines at high speed into the system, you must use this discipline, as the system otherwise may detect high input data
rates on terminal lines and disables the lines; in any case the processing of such data when normal terminal mechanisms are involved satu-
rates the system.
The line discipline is enabled by a sequence:
#include <sgtty.h>
int ldisc = NETLDISC, fildes; ...
ioctl(fildes, TIOCSETD, &ldisc);
A typical application program then reads a sequence of lines from the terminal port, checking header and sequencing information on each
line and acknowledging receipt of each line to the sender, who then transmits another line of data. Typically several hundred bytes of
data and a smaller amount of control information will be received on each handshake.
The old standard teletype discipline can be restored by doing:
ldisc = OTTYDISC;
ioctl(fildes, TIOCSETD, &ldisc);
While in networked mode, normal teletype output functions take place. Thus, if an 8 bit output data path is desired, it is necessary to
prepare the output line by putting it into RAW mode using ioctl(2). This must be done before changing the discipline with TIOCSETD, as
most ioctl(2) calls are disabled while in network line-discipline mode.
When in network mode, input processing is very limited to reduce overhead. Currently the input path is only 7 bits wide, with newline the
only recognized character, terminating an input record. Each input record must be read and acknowledged before the next input is read as
the system refuses to accept any new data when there is a record in the buffer. The buffer is limited in length, but the system guarantees
to always be willing to accept input resulting in 512 data characters and then the terminating newline.
User level programs should provide sequencing and checksums on the information to guarantee accurate data transfer.
SEE ALSO
tty(4)
DIAGNOSTICS
None.
BUGS
The Purdue uploading line discipline, which provides 8 bits and uses timeout's to terminate uploading should be incorporated into the stan-
dard system, as it is much more suitable for microprocessor connections.
4th Berkeley Distribution January 27, 1996 BK(4)