sed delete but save deleted output into other file
Hi guys, I am currently using this to save first 50 lines into top50.txt and delete them from list.txt ... it's 2 commands:
I want to change that so it's 1 command - whereby sed removes the first 50 lines as above but that which is removed gets saved to top50.txt - so no need for the head command as I am doing....
I have a window open on my ultra 10 - a terminal window connecting to a server.
Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)
hello hackers.
i have a curl process running as cgi directly pushing stdout to the client. but i want to additionally save that stream to a file at the same time.
any directions madly welcome.
thanks in advance (3 Replies)
Hi,
I am simply trying to remove the header row from a file using sed, but I'm running into strange difficulties.
It seems that in addition to removing the first line, this command is also removing the last line (or more specifically, clearing the last line, since the line is still counted... (4 Replies)
hi there !
i have exactly the same problem like this guy here
https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html
i am not able to save the curl verbose output..
the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
I'm using the following script to check cisco router health and I'd like to save output to a file,
vty_runcmd.sh > /check/check-cisco-health
script works and output is saved to a file. However using it in crontab file is created but output is not printed inside it. In crontab,
*/5 * * * *... (4 Replies)
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Hi there.
i have created a program that in the end it will give output like this
1 2 3 4 5
10 9 8 7 6
11 12 13 14 15
.............. 17
i wonder how to save the output into a single string and into a file.
i.e 1 10 11 12 9 2 3 8 13 14 7 4 5 6 15 17 (in this order,... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi there.
i have created a program that in the end it will give output like this
1 2 3 4 5
10 9 ... (1 Reply)
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Core Utilization
CoreId %Usr %Sys %Total
------ ----- ----- ------
5 4.91 0.01 4.92
6 0.06 ... (0 Replies)
Hi,
I am generating a YAML file from a hosts file, but am having trouble saving it to a new file.
hosts file
127.0.0.1 localhost
192.168.1.2 host1
192.168.1.3 host2
192.168.1.4 host3
192.168.1.5 host4
YAML file
$ echo 'host_entries:' && awk '{printf " %s:\n ip:... (3 Replies)
Discussion started by: sand1234
3 Replies
LEARN ABOUT CENTOS
beav
BEAV(1) General Commands Manual BEAV(1)NAME
beav - binary file editor and viewer
SYNOPSIS
beav [file...]
DESCRIPTION
This is a brief description of the minimal set of commands that are necessary to start using beav effectively. For more information,
review the file /usr/share/doc/beav/beav140.txt.gz.
The file-visit command, Ctl-X Ctl-V, can be used to read a file in for editing. The file can also be read in from the command line; beav
<edit_file>.
Data is displayed in one or more windows. These commands can be used to navigate around the windows.
move-back-char Ctl-B moves left
move-back-line Ctl-P moves up
move-forw-char Ctl-F moves right
move-forw-line Ctl-N moves down
window-delete Ctl-X 0 delete window
window-expand Ctl-X 1 expand window
The move-to-byte command, Ctl-X G, will prompt you for a byte position to move to.
These commands will insert a zero byte at the cursor position or delete the byte at that position.
insert-unit Ctl-X I
delete-forw-unit Esc D
The file-save command, Ctl-X Ctl-S, will save the data to the file if a change has been made.
The help command, Esc ?, will display a list of all commands and their current key bindings.
The abort-cmd command, Ctl-G, will abort any command that is in operation.
The quit-no-save command, Ctl-X Ctl-C, will exit beav. If there is any data that has not been saved you will be warned.
FILES
/usr/share/doc/beav/beav140.txt.gz
BEAV(1)