11-06-2008
how about...
tail +2 myfile | head -1 | cut -c44-47
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I tried using SED to do this, but I'm not having any luck with it. See the previous thread here.
I have a program called AMStracker (on OS X) that spits out the values of the motion sensor in the HDD. It has output that looks like this:
.
.
3 0 -75
3 0 -76
3 0 -77
.
.
I need to... (5 Replies)
Discussion started by: c0nn0r
5 Replies
2. Shell Programming and Scripting
I was using the following bash command inside the emacs compile command to search C++ source code:
grep -inr --include='*.h' --include='*.cpp' '"' * | sed "/include/d" | sed "/_T/d" | sed '/^ *\/\//d' | sed '/extern/d'
Emacs will then position me in the correct file and at the correct line... (0 Replies)
Discussion started by: siegfried
0 Replies
3. UNIX for Dummies Questions & Answers
I am having a stupid moment :-)
I have a tab-delimited file with 2 columns. I want to keep the first column as it is, but I only want the first 8 characters of the 2nd column.
Example of input file data:
---------------------------------
CATERPILLARS CW001651K.dwg... (9 Replies)
Discussion started by: cassj
9 Replies
4. Shell Programming and Scripting
Hello -
I have a file that has the something like the following :
REM CREATE TABLE lots of text
REM table specifc creation text ;
REM ALTER TABLE lots of text
REM text specific to the the alter command
REM could be more lines of text;
What I need is to get all the lines for the ALTER... (2 Replies)
Discussion started by: Feliz
2 Replies
5. Shell Programming and Scripting
Hey gang,
I have:
XXZZXXZZXX 123 asdaffggh dfghyrgr ertyhdhh XXZZXXZZXX 234 sdg XXZZXXZZXX 456 gfg fggfd
That is all on one line. Very simply put I want to do is something like:
sed s'/XXZZXXZZXX /\n/g'
or
tr 'XXZZXXZZXX ' '/n'
I have tried various things but can never get the desired... (6 Replies)
Discussion started by: crowman
6 Replies
6. Shell Programming and Scripting
Hi I'm new to sed, and need to add characters into a specific location of a file, the fileds are tab seperated.
text <tab> <tab> text <tab> text EOL
I need to add more characters to the line to look like this:
text <tab> <tab> newtext <tab> text <tab> text EOL
Any ideas? (2 Replies)
Discussion started by: tangentviper
2 Replies
7. Shell Programming and Scripting
Hello,
I do not know why the output from these two methods differs. One method retains the newlines, the other method appears to ignore or lose the newlines.
Writing a file with the redirection operator:
egrep -e 'matchstring' infile.txt > outfile.txt
The resulting outfile.txt contains... (3 Replies)
Discussion started by: duderonomy
3 Replies
8. UNIX for Dummies Questions & Answers
Howdy,
I need a command which will find all of the characters in a line before the first .
I am using Korn
Thank you (3 Replies)
Discussion started by: jgrosecl
3 Replies
9. Shell Programming and Scripting
Hi All,
This might be a basic question... I need to write a script to find all/any Speacial/Null/Control Chars and Print Line Numbers from an input file.
Output something like
Null Characters in File Name at : Line Numbers
Line = Print the line
Control Characters in File Name at : Line... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
LEARN ABOUT DEBIAN
mu-cade
Mu-cade(6) Mu-cade(6)
NAME
mu-cade - chase action game
DESCRIPTION
The Physics Centipede Invasion Smashup waggly shmup, 'Mu-cade'
Mu-cade is another shoot-em-up game by Kenta Cho. In this game Kenta has introduced physics into his formula of hardcore shooting games.
Similar in some ways to Asteroids and Nibbles, the playing area is a rectangular arena in which vessel-snakes have only one idea at the
head: expelling the others into the vacuum. You incarnate one of them, and you'll quickly realize the subtlety of the goal: your tail
lengthens as you destroy your enemies.
OPTIONS
These command-line options are available:
-brightness n
Set the brightness of the screen. (n = 0 - 100, default = 100)
-res x y
Set the screen resolution to (x, y). (default = 640, 480)
-nosound
Stop the sound.
-window
Launch the game in a window.
-fullscreen
Launch the game in fullscreen mode.
-exchange
Exchange a shot key and a cut off key.
-rotatestick2 n
Rotate the direction of the stick2 in n degrees.
-reversestick2
Reverse the direction of the stick2.
-disablestick2
Disable the input of the stick2.
-enableaxis5
Use the input of axis 5 to fire shots and axis 3 to cut off the tail. (for Xbox 360 wired controller)
USAGE
Keep your ship from falling down and push enemies out of the way.
Controls:
Move
Arrow / Num / [WASD] / Stick1 (Axis 1, 2)
Fire shots / Hold direction
[Z][L-Ctrl][R-Ctrl][.] / Trigger 1, 3, 5, 7, 9, 11
[IJKL] / Stick2 (Axis 3 or 5, 4)
Hold a key to open automatic fire and hold the direction of a ship. Tap a key to take a turn while firing.
You can also fire shots with the second stick. (If you have a problem with the direction of the stick2, try '-rotatestick2' and
'-reversestick2' options. e.g. '-rotatestick2 -90 -reversestick2') (If you are using Xbox 360 wired controller, use '-enableaxis5'
option.)
Cut off the tail
[X][L-Alt][R-Alt][L-Shift][R-Shift]
[/][Return][Space] / Trigger 2, 4, 6, 8, 10, 12
Cut off the tail of your ship. This action also wipes out all bullets and you obtain powerful shots for a while.
Pause
[P]
Exit / Return to the title
[ESC]
Tail multiplier:
The tail of your ship becomes longer when you push an enemy out and you get a score multiplier.
Extra ship:
You earn an extra ship 50,000 and every 200,000 points.
SEE ALSO
You can find more about the game on its homepage: Homepage: http://www.asahi-net.or.jp/~cs8k-cyu/windows/mcd_e.html
AUTHOR
Mu-cade has been written by Kenta Cho <cs8k-cyu@asahi-net.or.jp>
Mu-cade(6)