10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
2. Shell Programming and Scripting
The awk below executes and produces the current output, which is correct, except I can not seem to include the header lines # and ## in the output as well. I tried adding !/^#/ thinking that it would skip the lines with # and output them but the entire file prints as is. Thank you :).
file
... (8 Replies)
Discussion started by: cmccabe
8 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm trying to sort 2 different .txt tab delimited files with the command line:
sort -k 1b,1 inputfile > outputfile
But doing that i'm also sorting the header (that ends at the end of my file).
How can i sort a .txt file without sorting the header but conserving the header in the... (3 Replies)
Discussion started by: alisrpp
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Is there a way to write to a txt file each day but retain the header on the file? I'm cat'ing 5 files into one .txt file each day but I want the new data to be written after the first 2 lines which are:
Progname Size Date Owner
----------------------------
Basically I want my new... (4 Replies)
Discussion started by: Grueben
4 Replies
5. Shell Programming and Scripting
Hi
I am writing a perl script which checks for the specific column values from a file and writes to the OUT file.
So the feed file has a header information and footer information.
I header information isaround107 lines i.e.
Starts with
START-OF-FILE
.......
so on ....
... (11 Replies)
Discussion started by: filter
11 Replies
6. UNIX for Dummies Questions & Answers
How can i tweak sendmail configuration files so that the "Received:" field is removed from email header information?
Or else can i change Received: (from enswitch@localhost) in email header to something likeReceived: (from xyz@localhost)?
---------- Post updated at 09:57 PM ---------- Previous... (2 Replies)
Discussion started by: proactiveaditya
2 Replies
7. Shell Programming and Scripting
I have large file with around 100k+ lines. I wanted to retain only the last 100 lines in that file. One way i thought was using
tail -1000 filename > filename1
mv filename1 filename
But there should be a better solution.. Is there a way I can use sed or any such command to change the... (9 Replies)
Discussion started by: nss280
9 Replies
8. Shell Programming and Scripting
There are directories of files that I have to run the dos2ux command on to get ride of the carriage return characters. Easy enough, but I have to retain the original timestamps on the files. I am thinking that I am going to have to strip off the timestamp for each file and convert it to unix time... (3 Replies)
Discussion started by: scotbuff
3 Replies
9. Shell Programming and Scripting
Hello.
I have written a bash script that I am sharing with an OS X community I am a member of. The purpose of the script is to execute a series of commands for members without them having to get involved with Terminal, as it can be daunting for those with no experience of it at all. I have renamed... (4 Replies)
Discussion started by: baza210
4 Replies
10. Linux
say i have these many file in a directory named exam.
1)/exam/newfolder/link.txt.
2)/exam/newfolder1/
and i create a tar say exam.tar
well the problem is,
when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories.
on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies
NE_GET_RESPONSE_HEAD(3) neon API reference NE_GET_RESPONSE_HEAD(3)
NAME
ne_get_response_header, ne_response_header_iterate - functions to access response headers
SYNOPSIS
#include <ne_request.h>
const char *ne_get_response_header(ne_request *request, const char *name);
void *ne_response_header_iterate(ne_request *request, void *cursor, const char **name, const char **value);
DESCRIPTION
To retrieve the value of a response header field, the ne_get_response_header function can be used, and is given the name of the header to
return.
To iterate over all the response headers returned, the ne_response_header_iterate function can be used. This function takes a cursor
parameter which should be NULL to retrieve the first header. The function stores the name and value of the next header header in the name
and value parameters, and returns a new cursor pointer which can be passed to ne_response_header_iterate to retrieve the next header.
RETURN VALUE
ne_get_response_header returns a string, or NULL if no header with that name was given. If used during request processing, the return value
pointer is valid only until the next call to ne_begin_request, or else, until the request object is destroyed.
Likewise, the cursor, names, and values returned by ne_response_header_iterate are only valid until the next call to ne_begin_request or
until the request object is destroyed.
EXAMPLES
The following code will output the value of the Last-Modified header for a resource:
ne_request *req = ne_request_create(sess, "GET", "/foo.txt");
if (ne_request_dispatch(req) == NE_OK) {
const char *mtime = ne_get_response_header(req, "Last-Modified");
if (mtime) {
printf("/foo.txt has last-modified value %s
", mtime);
}
}
ne_request_destroy(req);
SEE ALSO
ne_request_create, ne_request_destroy.
AUTHOR
Joe Orton <neon@lists.manyfish.co.uk>
Author.
COPYRIGHT
neon 0.29.6 3 May 2011 NE_GET_RESPONSE_HEAD(3)