06-18-2009
the comand tail will give you the end of the file; for everything but the first line try:
tail --lines=+2 filename
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
i need in csh to extract only the Memory line from the out put of the top command how can it easily done (1 Reply)
Discussion started by: umen
1 Replies
2. Programming
I'm writing a monitoring application. I'd like to periodically get the information provided by the 'top' command line utility from within my code and write the output of 'top' to a file. Wondering if anyone has already done something like this.
Doing
system("top > someFile");
does not create... (6 Replies)
Discussion started by: antoniomorandi
6 Replies
3. AIX
Hi
All,
I have AIX 5.3 server. I have one big file. in that i want to remove 5000 line from top. is there any command for this?
Thanks,
Vishal (6 Replies)
Discussion started by: vishalpatel03
6 Replies
4. Shell Programming and Scripting
say I want to insert "this is a test" as the first line into file A, besides
echo "this is a test" > /tmp/tmpfile
cat /tmp/tmpfile fileA >> /tmp/result,
is there any simple way I can do it? thanks (7 Replies)
Discussion started by: fedora
7 Replies
5. Shell Programming and Scripting
hi,
My code is
#!/bin/sh
echo "\n\nPlease enter the month of the year(YYYYMM) : \c"
read date_rep
INPUT_L9_FILE=L9_Recharge_Description_EOM_$date_rep.csv
#This part is used to summarise Grand_Total, Balance_Total of file L9_Recharge_Description_EOM_${1}.csv.
awk -F"," '{if(NR!=1)... (5 Replies)
Discussion started by: madfox
5 Replies
6. Shell Programming and Scripting
I have parsed a curl download with sed commands. I would also like to move the last line in the output file to the top. Can I use sed for this? (3 Replies)
Discussion started by: jostber
3 Replies
7. UNIX for Dummies Questions & Answers
infile
a b c
A E F
1 2 3 outfile
new line
a b c
A E F
1 2 3 I tried:
sed '1i\
new line' infile > outfilecat outfile
new linea b c
A E F
1 2 3 I don't want the new line be added to the existing first line.
Thanks
Joseph (7 Replies)
Discussion started by: jdhahbi
7 Replies
8. Shell Programming and Scripting
Hi
Is there way to, say, echo a line and make sure it is always displayed on the first line, no matter what is coming out on stdout?
eg:
#!/bin/bash
clear
echo " ...... Internal audit script ......"
tar xvf hugefile.tar
I'd like to have the " Internal audit script " line to be shown... (2 Replies)
Discussion started by: bludhemn
2 Replies
9. Shell Programming and Scripting
Hi,
I have a following file and it has only one occurrence of line that says "Output view:". It could be in middle somewhere ( i don't know the exact location ). I want to move it as the first line of the file.
Input
AAA
BBBB
CCCC
Output view:
XXXX
YYYY
ZZZZ
Output should be:
Output... (13 Replies)
Discussion started by: jakSun8
13 Replies
10. Shell Programming and Scripting
Platform : Oracle Linux 6.8
Shell : bash
I have a file which has lines like below. These are SELECT queries (SQL)
In each line, I want the word just after FROM keyword to be copied and printed on the top along with the word PROMPT.
The words after FROM clause below are table names. So, they... (6 Replies)
Discussion started by: John K
6 Replies
LEARN ABOUT OSX
tk_movetoplevelwindow
Tk_MoveToplevelWindow(3) Tk Library Procedures Tk_MoveToplevelWindow(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tk_MoveToplevelWindow - Adjust the position of a top-level window
SYNOPSIS
#include <tk.h>
Tk_MoveToplevelWindow(tkwin, x, y)
ARGUMENTS
Tk_Window tkwin (in) Token for top-level window to move.
int x (in) New x-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border
supplied for tkwin by the window manager, if there is one.
int y (in) New y-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border
supplied for tkwin by the window manager, if there is one.
_________________________________________________________________
DESCRIPTION
In general, a window should never set its own position; this should be done only by the geometry manger that is responsible for the win-
dow. For top-level windows the window manager is effectively the geometry manager; Tk provides interface code between the application and
the window manager to convey the application's desires to the geometry manager. The desired size for a top-level window is conveyed using
the usual Tk_GeometryRequest mechanism. The procedure Tk_MoveToplevelWindow may be used by an application to request a particular position
for a top-level window; this procedure is similar in function to the wm geometry Tcl command except that negative offsets cannot be speci-
fied. It is invoked by widgets such as menus that want to appear at a particular place on the screen.
When Tk_MoveToplevelWindow is called it does not immediately pass on the new desired location to the window manager; it defers this action
until all other outstanding work has been completed, using the Tk_DoWhenIdle mechanism.
KEYWORDS
position, top-level window, window manager
Tk Tk_MoveToplevelWindow(3)