Hello,
I have the following to remove spaces from beginning and end of a string.
infile=`echo "$infilename" | sed 's/^ *//;s/ *$//`
How do I modify the above code to remove spaces from beginning, end and in the middle of the string also.
ex:
... (4 Replies)
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
if the answer is obvious, sorry, I'm new here.
anyway, I'm using tr to encrypt with rot-13:
echo `cat $script | tr 'a-zA-Z' 'n-za-mN-ZA-M'` > $script
it works, but it removes any consecutive spaces so that there is just one space between words. I've had this problem before while using sed to... (5 Replies)
Hi all,
i am getting count from oracle 11g by spooling it to a file.
Now there are some newline characters and blank spaces i need to remove these.
pl provide me a awk/sed solution.
the spooled file is attached.
i tried this.. but not getting req o/p (6 Replies)
Hello all,
I have a problem with a bash script. It contains an MySQL query, which when I run it 'as is', executes without a problem.
When, however, I try to get it to assign its output to a variable, using the backtick, I get errors.
So ..
/usr/bin/mysql -N -B mydatabase -e 'SELECT... (3 Replies)
Hi, I have data that looks similar to this:
In which the sentences are written horizontally and the beginning of a sentence is indicated by a 1 in the first column and the number increments until the last item of the sentence. The end of the sentence and the beginning of the next is then indicate... (1 Reply)
hi all ,
i had the below sed command to append header at the starting of my output file ....
sed -i -e '1i saikumar suresh hemanth' output.txt
i want to append spaces to the Name saikumar how can i append with in this command ....? (1 Reply)
The following command works echo "some text with spaces" | sh -c 'sed -e 's/t//g''But this doesn't and should echo "some text with spaces" | sh -c 'sed -e 's/ //g''Any ideas? (3 Replies)
Discussion started by: Tribe
3 Replies
LEARN ABOUT LINUX
pure-ftpwho
pure-ftpwho(8) Pure-FTPd pure-ftpwho(8)NAME
pure-ftpwho - Report current FTP sessions
SYNTAX
pure-ftpwho [-c] [-h] [-H] [-n] [-p] [-s] [-v] [-w] [-W] [-x]
DESCRIPTION
pure-ftpwho shows current Pure-FTPd client sessions. Only the system administrator may run this. Output can be text (default), HTML, XML
data and parser-optimized. The server has to be compiled with --with-ftpwho to support this command.
OPTIONS -c the program is called via a web server (CGI interface) . Output is a full HTML page with the initial content-type header. This
option is automatically enabled if an environment variable called GATEWAY_INTERFACE is found. This is the default if you can the
program from a CGI-enabled web server (Apache, Roxen, Caudium, WN, ...) .
-h Output help information and exit.
-H Don't resolve host names, and only show IP addresses (faster).
-n A synonym for -H.
-p Output Mac OSX / GNUStep plist data.
-s Output only one line per client, with only numeric data, delimited by a | character. It's not very human-readable, but it's
designed for easy parsing by shell scripts (cut/sed) . '|' characters in user names or file names are quoted (|) .
-v Output an ASCII table (just like the default mode), with more info. The verbose output includes the local IP, the local port, the
total size of transfered files and the current number of transfered bytes.
-w Output a complete HTML page (web mode).
-W Output an HTML page with no header and no footer. This is an embedded mode, suitable for inline calls from CGI, SSI or PHP scripts.
-x Output well-formed XML data for post-processing.
FILES
/var/run/pure-ftpd/ Scoreboard directory. Should always owned by root and on a lockable filesystem.
ENVIRONMENT VARIABLES
GATEWAY_INTERFACE
If found, automatically run in CGI mode and output HTML data.
AUTHORS
Frank DENIS <j at pureftpd dot org>
SEE ALSO ftp(1), pure-ftpd(8)pure-ftpwho(8)pure-mrtginfo(8)pure-uploadscript(8)pure-statsdecode(8)pure-pw(8)pure-quotacheck(8)pure-authd(8)
RFC 959, RFC 2389, RFC 2228 and RFC 2428.
Pure-FTPd team 1.0.36 pure-ftpwho(8)