01-24-2010
Use sed to move last line to top
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?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Does anyone know how to insert text at the top and bottom of a file using sed? (12 Replies)
Discussion started by: MBGPS
12 Replies
2. Shell Programming and Scripting
Hello,
I'm trying to move the last word of matching pattern to the begining of next line. Appreciate if anyone post the script.
From the below line I'm getting the last word, Note: this word also appears in many places in my file
#return the last word of line that contains ListenPort
sed... (4 Replies)
Discussion started by: baskar
4 Replies
3. Shell Programming and Scripting
i have some 1000 files in my dir and i want to find top 100 files and move them to some other location:
below the 2 commands i used, but it is not working
ls -ltr | grep ^- | head -100 | xargs mv destination - _________>not working
ls -ltr | grep ^- | head -100 | xargs mv {}... (3 Replies)
Discussion started by: ali560045
3 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 there
if I use `head -1` it gives me the top line .... is there a utility out there that will give me everything other than the top line ?
I know how to achieve this by taking the file out to another file etc, but id like to be able to do it without creating additional files
is this... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
6. 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
7. Shell Programming and Scripting
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
2 Replies
8. Shell Programming and Scripting
So say I have the file:
john
london
24
male
========
jane
london
22
female
========
mike
23
========
Bob
how do i get the information i need on one line as such: (5 Replies)
Discussion started by: linuxkid
5 Replies
9. Shell Programming and Scripting
Hello,
I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help.
I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
Discussion started by: paroikoi
3 Replies
10. 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
LEARN ABOUT MOJAVE
curlopt_maxfilesize_large
CURLOPT_MAXFILESIZE_LARGE(3) curl_easy_setopt options CURLOPT_MAXFILESIZE_LARGE(3)
NAME
CURLOPT_MAXFILESIZE_LARGE - maximum file size allowed to download
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE_LARGE,
curl_off_t size);
DESCRIPTION
Pass a curl_off_t as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is
found larger than this value, the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being
larger than this given limit. This concerns both FTP and HTTP transfers.
DEFAULT
None
PROTOCOLS
FTP and HTTP
EXAMPLE
TODO
AVAILABILITY
Added in 7.11.0
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO
CURLOPT_MAXFILESIZE(3), CURLOPT_MAX_RECV_SPEED_LARGE(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_MAXFILESIZE_LARGE(3)