11-06-2007
The "sed" command should not alter lines that were not selected.
However, FTP may "help" you by converting text files. If the files are transferred as binary instead of ASCII, then they shall remain unmodified.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I face some problem with handling of nulls. I declare a variable - say i - and intialise to 0. Later I read it from console, wherein if I dont give any variable and press return key, I get this error:
"0403-004 Specify a parameter with this command"
Is there anyway to handle this error?
... (3 Replies)
Discussion started by: mohanprabu
3 Replies
2. Shell Programming and Scripting
Ok, so when a user inputs nothing, simply pressing enter when prompted for a phone number, I get a "./addrbkfct.sh: test: argument expected" error message. I have the following function:
addNumber(){
echo "Phone number: \c";
read number;
echo $number;
if ;... (2 Replies)
Discussion started by: DrRo183
2 Replies
3. Shell Programming and Scripting
Hi All,
I have a problem with Null values while reading line by line from a text file. I wrote a shell script to read set of file names from a text file line by line, and zipping the each individual file and copying those zip files into some separate directory, and removing the original file... (3 Replies)
Discussion started by: npk2210
3 Replies
4. UNIX for Advanced & Expert Users
Hi,
Can someone help me comparing Null values.
Scenario is as follows:
I have a variable which "cache_prd" which can have either some integer or nothing(Null)
if it is integer I have to again do some comparision but these comparisons give me this error:( "line 32: [: 95: unary operator... (3 Replies)
Discussion started by: Yagami
3 Replies
5. Shell Programming and Scripting
Hi Im running this script, which is supposed to find the max value build some tables and then stop running once all the tables are built. Thing is , it keeps assigning a null value to $h and then $g is null so it keep building tables i.e. testupdateNUL. How can I stop this? Here is what I have:
... (4 Replies)
Discussion started by: brandono66
4 Replies
6. Shell Programming and Scripting
Hi
I have a file with the values
abc
res
set
kls
lmn
ops
i want to sort this file with the null values at the bottom of the file
OUTPUT should look like this
abc
kls
lmn
ops (6 Replies)
Discussion started by: vickyhere
6 Replies
7. Shell Programming and Scripting
I kind of found out the hard way that I am not able to manipulate the null value, the long silence that happens when there is no value returned.
I am looking for PIDs, and when there is no PID return, I wanted to handle this special scenario.
Here is my script.
#!/bin/bash
LAN_VARIABLE=... (7 Replies)
Discussion started by: lan123
7 Replies
8. Shell Programming and Scripting
Hello everyone
I am doing a join command. Obviously, before I need two files sorted first. ( Both files have headers and have about 2 million lines each one )
The problem is, one of the files has null values in the key to sort (which is the first filed ). For example I have the original... (4 Replies)
Discussion started by: viktor1985
4 Replies
9. Shell Programming and Scripting
Hi All ,
below is my shell program.
!/bin/sh
set -x
#----------------------------------------------------------------------------------------
# Program : weekly_remove_icd_file.sh
# Author :
# Date : 04/06/2013
# Purpose : Execute the script to... (3 Replies)
Discussion started by: krupasindhu18
3 Replies
10. UNIX for Beginners Questions & Answers
Hi Folks,
I'm trying to write a simple file sanity check script. I have a directory with dozen CSV files containing id,edname,firstname,lastname,suffix,email.
I like to write a awk script to check if first field contain a number and is not empty. and fields number 3,4 & 6 are not empty and... (3 Replies)
Discussion started by: dc34684
3 Replies
LEARN ABOUT PHP
ftpconversions
ftpconversions(4) File Formats ftpconversions(4)
NAME
ftpconversions - FTP Server conversions database
SYNOPSIS
/etc/ftpd/ftpconversions
DESCRIPTION
When the FTP Server, in.ftpd(1M), receives the retrieve (RETR) command, if the specified file does not exist, it looks for a conversion to
change an existing file or directory of the same base name into the format requested, subject to the ftpaccess(4) compress and tar capabil-
ities.
The conversions and their attributes known by in.ftpd(1M) are stored in an ASCII file of the following format. Each line in the file pro-
vides a description for a single conversion. The fields in this file are separated by colons (:).
%s:%s:%s:%s:%s:%s:%s:%s
1 2 3 4 5 6 7 8
The fields are described as follows:
1 Strip prefix.
2 Strip postfix.
3 Addon prefix.
4 Addon postfix.
5 External command.
6 Types.
7 Options.
8 Description.
The Strip prefix and Addon prefix fields are not currently supported.
The Strip postfix and addon postfix fields are extensions to be added to or removed from the requested filename in attempting to produce
the name of an existing file or directory. When the attempt succeeds, the FTP Server runs the external command associated with the conver-
sion. The magic cookie %s in the argument is passed to the command, replaced with the name of the existing file or directory.
External command is the absolute pathname of a command to run followed by the appropriate options to carry out the conversion. The standard
output of the command is sent back in response to the RETR (retrieve) command. For anonymous and guest users to be able to execute the com-
mand, it must be present in their chroot'd hierarchy along with any necessary dynamic libraries.
Types specifies the conversion type. The following values are recognized:
T_ASCII ASCII transfers are allowed of a file produced by the conversion.
T_DIR Directories can be converted.
T_REG Regular files can be converted.
Options are checked against the ftpaccess(4) compress and tar capabilities and are recorded in the special-action-flag field that is writ-
ten to the FTP Server logfile. See xferlog(4). The following options are supported:
O_COMPRESS conversion compresses
O_TAR conversion archives
O_UNCOMPRESS conversion uncompresses
You can specify more than one option by using "|" to separate options. For example, O_TAR|O_COMPRESS specifies that the conversion archives
and compresses.
Description is a one word description of the conversion that is used in error messages returned to the FTP client.
Lines that begin with a # sign are treated as comment lines and are ignored.
EXAMPLES
Example 1: Compressing a Regular File for Transfer
The following example specifies a conversion which generates filename.Z by compressing an existing file filename. The conversion can only
be applied to regular files, not directories, and the absence of T_ASCII prevents the resulting file from being transferred in ASCII mode.
: : :.Z:/usr/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS
Example 2: Uncompressing and Transferring in ASCII Mode
The following example specifies a conversion that takes filename.Z and uncompresses it to produce filename, which then can be transferred
in ASCII mode.
:.Z: : :/usr/bin/compress -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
FILES
/etc/ftpd/ftpconversions
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWftpr |
+-----------------------------+-----------------------------+
SEE ALSO
ldd(1), in.ftpd(1M), ftpaccess(4), xferlog(4), attributes(5)
SunOS 5.10 1 May 2003 ftpconversions(4)