Sponsored Content
Full Discussion: changing filename extension
Top Forums Shell Programming and Scripting changing filename extension Post 302279845 by Hiso on Saturday 24th of January 2009 07:14:21 AM
Old 01-24-2009
Funny...
I dont want to move from .doc to .dxs.
Actually .dxs will be the compiled version of .doc... so i am writing a script which will compile all .docs (for eg) and move all the created .dxs's (i.e, created after compilation) to another folder.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

separating filename and extension

Hi (warning: newbie question), I am writing a script to run a series of tests on a program, which involves a line: for file in `ls test_suite/*.args` but later I want to send the output to file.out. But I need to separate the filename and extension somehow...Also $file contains... (2 Replies)
Discussion started by: lucaspewkas
2 Replies

2. Shell Programming and Scripting

Changing extension

Hi , I need to replace the file name extension with txt to csv,i wrote the below script when executing its giving the below error.Please anyone how to do this? $ a2.sh mv: *.: cannot access: No such file or directory ./a2.sh: o: bad number $ vi a2.sh a2.sh ----- #!/bin/ksh txt=$1... (4 Replies)
Discussion started by: mohan705
4 Replies

3. UNIX for Dummies Questions & Answers

Changing the extension of the file

I have a list of files in a particular folder Example: File name - sample.F1.test I want to change the extension of the above file to .csv The final file should be renamed as sample.csv (4 Replies)
Discussion started by: mazhar803
4 Replies

4. UNIX for Dummies Questions & Answers

changing file extension

Hello, everyone! :] I'm having an issue with my camera/uploading to Photobucket. When my camera transfers it's photos to my hard drive, it transfers them as .JPG. Unfortunately, when I go to upload to my Photobucket account, it only accepts .jpg & .jpeg files. Every time I want to upload, I... (6 Replies)
Discussion started by: spidydude
6 Replies

5. UNIX for Dummies Questions & Answers

script takes the whole filename instead of just extension

I am running my script from "/abc/" this path and it has no ".csv files" but has a ".txt" files namely temp1.txt My script goes as below, wherein it is suppose to find files with *.txt extension and *.csv extension in another path namely "/abc/xyz/": #!/bin/ksh PATH1="/abc/xyz/" value="*.csv... (1 Reply)
Discussion started by: wolverine999
1 Replies

6. UNIX for Dummies Questions & Answers

Changing file extension

Hello all, I need to change file extension for all .doc files to .txt file in multiple folders. I know the way to rename them by going to each folder and doing that, but I need something which I can run from home directory so that It does the renaming in all the nested directories. Thanks. (4 Replies)
Discussion started by: jaysean
4 Replies

7. Shell Programming and Scripting

cut filename extension

I need a small script (sh) to remove in a variable the filename extension. Example: f = "testfile.txt" and I need a $a with "testfile". Some one a idea? (4 Replies)
Discussion started by: Essbaumer
4 Replies

8. Shell Programming and Scripting

removing the filename extension

Is there an easy way to strip off a filename's extension? For example, here's a filename: blahblahblah.thisisok.thisisnotok I want to get rid of .thisisnotok from the filename, so that what's left is blahblahblah.thisisok Thanks. I have a directory full of filenames that need to be... (5 Replies)
Discussion started by: daflore
5 Replies

9. Shell Programming and Scripting

Get latest filename without extension

I need to write a shell script to display the output of ls command like this ls -ltr *txt I get this -rw-r----- 1 oracle dba 51912704 Dec 11 10:27 /usr/local/sam/test12112012101247AM.txt -rw-r--r-- 1 oracle dba 7 Dec 11 11:58 /usr/local/sam/test.txt but I just need the latest... (7 Replies)
Discussion started by: sumang24
7 Replies

10. Shell Programming and Scripting

[BASH] Getting a filename its extension

Heyas As i often have decide things upon a filename its extension, i thought i'd write a script: Just wondering if there would be a more efficent way? out="" FN=$( echo "$1" | sed s," ","",g) # Remove any spaces and make it a single string for chance in $(echo "$FN"|sed s,"\."," ",g) # Use... (7 Replies)
Discussion started by: sea
7 Replies
MOUSE(4)						     Linux Programmer's Manual							  MOUSE(4)

NAME
mouse - serial mouse interface CONFIGURATION
Serial mice are connected to a serial RS232/V24 dialout line, see ttyS(4) for a description. DESCRIPTION
Introduction The pinout of the usual 9 pin plug as used for serial mice is: pin name used for 2 RX Data 3 TX -12 V, Imax = 10 mA 4 DTR +12 V, Imax = 10 mA 7 RTS +12 V, Imax = 10 mA 5 GND Ground This is the specification, in fact 9 V suffices with most mice. The mouse driver can recognize a mouse by dropping RTS to low and raising it again. About 14 ms later the mouse will send 0x4D ('M') on the data line. After a further 63 ms, a Microsoft-compatible 3-button mouse will send 0x33 ('3'). The relative mouse movement is sent as dx (positive means right) and dy (positive means down). Various mice can operate at different speeds. To select speeds, cycle through the speeds 9600, 4800, 2400 and 1200 bit/s, each time writing the two characters from the table below and waiting 0.1 seconds. The following table shows available speeds and the strings that select them: bit/s string 9600 *q 4800 *p 2400 *o 1200 *n The first byte of a data packet can be used to synchronization purposes. Microsoft protocol The Microsoft protocol uses 1 start bit, 7 data bits, no parity and one stop bit at the speed of 1200 bits/sec. Data is sent to RxD in 3-byte packets. The dx and dy movements are sent as two's-complement, lb (rb) are set when the left (right) button is pressed: byte d6 d5 d4 d3 d2 d1 d0 1 1 lb rb dy7 dy6 dx7 dx6 2 0 dx5 dx4 dx3 dx2 dx1 dx0 3 0 dy5 dy4 dy3 dy2 dy1 dy0 3-button Microsoft protocol Original Microsoft mice only have two buttons. However, there are some three button mice which also use the Microsoft protocol. Pressing or releasing the middle button is reported by sending a packet with zero movement and no buttons pressed. (Thus, unlike for the other two buttons, the status of the middle button is not reported in each packet.) Logitech protocol Logitech serial 3-button mice use a different extension of the Microsoft protocol: when the middle button is up, the above 3-byte packet is sent. When the middle button is down a 4-byte packet is sent, where the 4th byte has value 0x20 (or at least has the 0x20 bit set). In particular, a press of the middle button is reported as 0,0,0,0x20 when no other buttons are down. Mousesystems protocol The Mousesystems protocol uses 1 start bit, 8 data bits, no parity and two stop bits at the speed of 1200 bits/sec. Data is sent to RxD in 5-byte packets. dx is sent as the sum of the two two's-complement values, dy is send as negated sum of the two two's-complement values. lb (mb, rb) are cleared when the left (middle, right) button is pressed: byte d7 d6 d5 d4 d3 d2 d1 d0 1 1 0 0 0 0 lb mb rb 2 0 dxa6 dxa5 dxa4 dxa3 dxa2 dxa1 dxa0 3 0 dya6 dya5 dya4 dya3 dya2 dya1 dya0 4 0 dxb6 dxb5 dxb4 dxb3 dxb2 dxb1 dxb0 5 0 dyb6 dyb5 dyb4 dyb3 dyb2 dyb1 dyb0 Bytes 4 and 5 describe the change that occurred since bytes 2 and 3 were transmitted. Sun protocol The Sun protocol is the 3-byte version of the above 5-byte Mousesystems protocol: the last two bytes are not sent. MM protocol The MM protocol uses 1 start bit, 8 data bits, odd parity and one stop bit at the speed of 1200 bits/sec. Data is sent to RxD in 3-byte packets. dx and dy are sent as single signed values, the sign bit indicating a negative value. lb (mb, rb) are set when the left (middle, right) button is pressed: byte d7 d6 d5 d4 d3 d2 d1 d0 1 1 0 0 dxs dys lb mb rb 2 0 dx6 dx5 dx4 dx3 dx2 dx1 dx0 3 0 dy6 dy5 dy4 dy3 dy2 dy1 dy0 FILES
/dev/mouse A commonly used symlink pointing to a mouse device. SEE ALSO
ttyS(4), gpm(8) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 1996-02-10 MOUSE(4)
All times are GMT -4. The time now is 12:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy