UNIX Sun Ultra60 5.5.1
Hello everybody, I have a problem that seems simple but turns out to be complex (for me at least). My program needs to open a directory (this part is easy), scan each filename and determine whether or not a file with the suffix (.07) exists. So the program would return... (5 Replies)
Hi -
I'm stuck. I have a group of text files created using the split command. My files have the names "projectaa", "projectab", "projectac", etc. What I want to do is add the extension ".txt" to each file. I think I've got part of a sed command together, but I'm stuck on my regex - I keep getting... (9 Replies)
One of my colleagues is having an issue moving files between a windows box and the AIX servers in the office.
The filenames are being truncated though i don't know to what extent. He's using Nero to burn the CD and I think he mentioned he's using Joliet.
I found another thread that shows a... (1 Reply)
Hi,
I'm trying to write a script that reads filenames from a file and use these filenames in a loop. The filenames are all on one line and the problem is that these filenames have wildcards like * and braces like in them.
Right now what I'm doing is something like this:
echo "reading from... (0 Replies)
Hi All,
I have a status.txt file which contains following three files.
1.xml
2.xml
3.xml
Now i have written a shell script 1.sh which contains the following
cat status.txt | while read filename
do
echo $filename
case "$filename" in
xml)
echo "running 1.xml"
;;
... (3 Replies)
Hi there,
I'm pretty new to UNIX and have tried trawling through this forum to find an answer to what I want to try to do, which I'm sure is very simple but I don't know how to do it.
What I have a a folder that contains multiple files that I have copied from Windows and I want to remove the... (5 Replies)
I have a filename with a bunch of periods that I want to replace with underscores, but I don't want to change the extension.
Ex: I want
file.test1.f-1.fig.eps
to be
file_test1_f-1_fig.eps
Using awk, the following line will replace ALL periods with underscores, but I want to leave the... (2 Replies)
hi,
i have a directory which contains some files and a subdirectory. i am writing only the files names to a file using the below code.
ls -ltr | grep "^-" | awk '{print $NF}' > /home/file_list$$
cat /home/file_list$$
s1_abc.txt
s2_def.xls
s3_def.xls
as you can see there is one .txt... (7 Replies)
Hello
I've got a certain no. of files in a directory whose names I'm reading and redirecting into a temporary text file using the command below:
ls -l | grep ^- | awk '{print $9}'However, whenever the file names contain spaces the above command considers only the part of the file name up to... (5 Replies)
Discussion started by: S. BASU
5 Replies
LEARN ABOUT DEBIAN
ns_getmimetype
Ns_Mime(3aolserver) AOLserver Library Procedures Ns_Mime(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
Ns_GetMimeType - Return the MIME type of a file
SYNOPSIS
#include "ns.h"
char *
Ns_GetMimeType(char *file)
_________________________________________________________________DESCRIPTION
Ns_GetMimeType(file)
The Ns_GetMimeType function uses the extension of file and looks up the associated MIME type stored internally in the server. Case
is ignored. The return value is of the form "text/html".
AOLserver has a set of predefined file extension to MIME type associations. You can add to these associations by defining file
extension to MIME type associations in the server configuration file in the ns/mimetypes section. If you define a file extension
that already exists in the server, that file extension and MIME type association will be replaced with yours.
If no MIME type association exists for a particular file extension, or there is no file extension, the default and noextension MIME
types are returned, respectively. These default to "*/*" but can be set in the server configuration file.
Here is an example ns/mimetypes section from the server configuration file:
ns_section "ns/mimetypes"
ns_param ".doc" "application/msword"
ns_param ".ppt" "application/vnd.ms-powerpoint"
ns_param ".xls" "application/vnd.ms-excel"
ns_param ".cab" "application/mscabinet"
ns_param ".frl" "application/x-perfpro"
ns_param ".max" "application/vviewer"
ns_param ".mif" "application/x-mif"
ns_param ".frz" "application/x-dffill"
ns_param ".asvg" "image/svg-xml"
ns_param ".asvgz" "image/svg-xml"
ns_param ".svg" "image/svg-xml"
ns_param ".svgz" "image/svg-xml"
ns_param default "*/*"
ns_param noextension "*/*"
SEE ALSO nsd(1), info(n)
KEYWORDS AOLserver 4.0 Ns_Mime(3aolserver)