08-02-2005
Cutting the top two lines, and also charachters below.
Hey all. I have a file that I am trying to cut information out of. We have a script that shows us all of our Radio Scanners that are being used and I'm writing a script that clears all of the context off of the scanners. The script that runs shows us this information below...
|emp_id |first_name|last_name |base_unit|radio_id|
|---------|----------|--------------------|---------|--------|
|S990CA2 |CORY |AUKERMAN | 1| 66|
|S990LR4 |LARRY |ROGERS | 1| 67|
|S990EF1 |ELIZABETH |FREDRITZ | 1| 69|
|S990JG7 |JARED |GEORGE | 1| 70|
|S990SM9 |SANTOS |MELCHOR JR. | 1| 71|
|S990RB8 |RONNIE |BOWLIN | 1| 73|
|S990MW3 |MEGAN |WARE | 1| 74|
|S990ML1 |MICHAEL |LOWERY | 1| 75|
|S990HW2 |HAMER |WOLFE | 1| 77|
|S990RB13 |RAY |BYERLY | 1| 81|
|S990DM3 |DEAN |MULVAINE | 1| 82|
|S990JH3 |JAY |HARTMAN | 1| 84|
The only info that I need are emp_id and the Radio_id. The only problem is, I don't know how to cut the top 2 or 3 lines to erase the headers. I have the characters that I need cut out just fine, but I'm not so sure about the top 2 lines. Any help would be great.
Thanks a lot.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Happy New Year!!!
I'm trying to cut out some text in a data file where I only want the first line and the last line.
For example.
1. Colin Was here <<-- Text I want to cut out
2. THIS IS THE TEXT I WANT TO CUT <- CUT THIS OUT
3. OUT BECAUSE IT'S NO GOOD TO ME <- CUT THIS OUT
4. I... (5 Replies)
Discussion started by: cfoxwell
5 Replies
2. UNIX for Dummies Questions & Answers
Can anyone tell me what the charachter maximum on a username is in SunOs 5.6.
Thanks
Mark (1 Reply)
Discussion started by: m.szylkarski
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have this problem of separating 10 consecutive lines from a file, say starting from 21 to 30... I have used a filter like this..
head -n 30 myfile | tail -n 10
Is there a simpler way than this? (2 Replies)
Discussion started by: Vishnu
2 Replies
4. Shell Programming and Scripting
HI All,
I want to cut 5 lines after a pattern using sed or awk. can any one tell me how to do it ? (2 Replies)
Discussion started by: raghin
2 Replies
5. Shell Programming and Scripting
Hi,
I have a file named Mani.txt. The contents are like this
cat Mani.txt
--------------------------------------------------------
Hi there how r u
My Name is Mani
Bye
------------------------------------------------------------
I want to cut the first and last lines from the file... (15 Replies)
Discussion started by: pathanjalireddy
15 Replies
6. Shell Programming and Scripting
Dear All,
Is there a way to cut the lines that have been "head"
Here is what i m trying to do Please advice
there is file name dummy.txt
now i am trying to head this file 4 time by using a loop and every time this file is head with different values
e.g in first instance it will... (7 Replies)
Discussion started by: jojo123
7 Replies
7. Shell Programming and Scripting
Please see the following code, between "status" and "OK" exists many spaces, I want to get status OK . how to ignore multi spaces? If tab exists in the spaces, how to ignore it ?
Is there other commands can replace cut?
$ echo 'drv status OK'| cut... (3 Replies)
Discussion started by: 915086731
3 Replies
8. UNIX for Dummies Questions & Answers
Hi.
I am not sure how to solve this problem and if it is possible to do so with scripting. :wall:
Let's say I have this data:
A 12345 12360
A 12359 12380
A 12381 12390
A 12400 12450
A 12451 12460
B 23456 23460
B 23470 23480
B 23477 23505
I wan't each line to be compared in this... (5 Replies)
Discussion started by: danieladna
5 Replies
9. Shell Programming and Scripting
Oracle Linux 6.4
In a directory I have more than 300 files with the extension .log
I want the first 5 and last 5 lines of these .log files to be printed on screen with each file's name.
Expected output :
Printing first 5 and last 5 lines of FX_WT_Feb8_2014.log
!! Authentication... (7 Replies)
Discussion started by: kraljic
7 Replies
10. UNIX for Dummies Questions & Answers
I am trying to remove columns 81-97 from a line that can be as long as 114 characters. Because a number of lines might not have under 80 characters, using the cut command following by paste could be a problem. While sed might work, is there some other utility that could do this more easily?
... (9 Replies)
Discussion started by: wbport
9 Replies
LEARN ABOUT DEBIAN
xbattbar
XBATTBAR(1) BSD General Commands Manual XBATTBAR(1)
NAME
xbattbar -- show battery status in X Window
SYNOPSIS
xbattbar [-a] [-t thickness] [-p interval] [-I color] [-O color] [-i color] [-o color] [-c] [-s script-name] [top | bottom | left | right]
DESCRIPTION
xbattbar shows the current (laptop) battery status in the X window environment. Battery status is obtained through the APM kernel module.
The APM kernel module depends on your UNIX platform, therefore, consult your documentation for its detail.
xbattbar shows its battery status in a simple bar indicator. -a option makes the indicator window keep always on top of your screen. The
thickness of the indicator is 3 pixels in default and you can set the thickness as a parameter of -t option. This indicator is appeared in
the bottom of the display, as its default. The option top, left, or right forces the status indicator to be at the top, left, and right of
the display, respectively. Though it's a default, you can also use buttom as the option.
In the case the AC line is on-line (plugged in), its color of the bar indicator consists of "green" and "olive drab" portions. The "green"
portion shows its battery charging level. These colors can be changed by -I and -O options. In the other case (AC line is off-line), the
"blue" portion of the bar indicator shows the percentage of its remaining battery level. The color conbination for the AC off-line case can
be changed by -i and -o options.
xbattbar trys to know its battery status in every 10 seconds in default. This is achived by APM polling. If it is used with option -c then
ACPI polling will be used.
You can use your external script for check battery status. It must print two lines to STDOUT 'battery=value' and 'ac_line=on|off
-p option sets the polling interval in second.
If the mouse cursor enters in the status indicator, the diagnosis window appears in the center of the display, which shows both AC line sta-
tus and battery remaining level. This diagnosis window disappears if the mouse cursor leaves from the status indicator.
AUTHOR
Suguru Yamaguchi <suguru@wide.ad.jp>, Akira Kato <kato@wide.ad.jp>, Noriyuki Shigechika <nazo@wide.ad.jp>, Dmitry E. Oboukhov
<unera@debian.org>
BSD
December 5, 1998 BSD