Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators How to Post in the The UNIX and Linux Forums Delete to eol after PASS with sed Post 302732999 by ppaprota on Monday 19th of November 2012 01:20:17 PM
Old 11-19-2012
Delete to eol after PASS with sed

working on script and saving ftp log
before log save want to remove the password
password appears after constant "PASS"

thanks
pp
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pass variable to sed?

Hi there. If variables are named inside of a ksh script, how is it possible to pass these to sed? The affected portion of my script goes something like this: A=`cut -d. -f1 $FILE` B=`cut -d. -f2 $FILE` C=`cut -d. -f3 $FILE` sed 's/1111/$A/g;s/2222/$B/g;s/3333/$C/g' file > anotherfile ... (2 Replies)
Discussion started by: kristy
2 Replies

2. Shell Programming and Scripting

pass a variable to sed p in a loop?

Hi, Thanks for looking,,,, (kornshell) tmp3 is a list of line numbers I want to print the lines from my list code: while read j do echo $j #works fine echo $filename #works fine #sed "'$jp'" "$filename" ... (7 Replies)
Discussion started by: JohnMario
7 Replies

3. Shell Programming and Scripting

Pass perl variable to sed

Hello, I'd like to pass a variable to a sed command in a perl script. The script is like this : #!/usr/bin/perl -w $newline="new"; system q(sed '/insert/ i\ '$newline <sed1.txt >sed2.txt); But the interpretor wouldn't recognize $newline, it inserts a "\n" instead. I've also... (4 Replies)
Discussion started by: hi_ryo
4 Replies

4. Shell Programming and Scripting

want to pass sentence with SED and CAT

I have to pass a sentence in a file, the specs are as: cat run | sed 's/SRT/'$8'/g' | sed 's/plength/68/g' | sed 's/stcol/'$5'/g' | sed 's/encol/'$6'/g' | sed 's/brdtype/'$1'/g' | sed 's/brdtxt/'$3'/g' | sed 's/demotxt/Total '$2'/g' | sed 's/bantxt/ban_'$7'/g' | sed 's/validcodes/'$4'/g' > runx... (1 Reply)
Discussion started by: patilrakesh1984
1 Replies

5. Red Hat

pass a variable line number to sed

num=10 sed -n '$num p' test.txt sed -n '10 p' test.txt works however i am putting the sed command in a loop and the line number is not static Can someone please help me how to achive this. (1 Reply)
Discussion started by: figure20012
1 Replies

6. Shell Programming and Scripting

pass parameter to SED

My script(ksh) works fine for --------------------------------------------------- sed -n '28,31p' ${l_name} >> ${LOG_DIR}/Email.txt --------------------------------------------------- But I wand to pass parrmeter to this syntax I did the following things ... (14 Replies)
Discussion started by: deep_kol
14 Replies

7. Shell Programming and Scripting

Need to pass value in sed command

Hi, I have a file a.xml containing the below <customerId>000</customerId> and a variable CUSTOMER_ID which is set to '333' Now I want to replace <customerId>000</customerId> with <customerId>333</customerId> by the below sed command and save the output in a file b.xml: sed... (3 Replies)
Discussion started by: RomitaaChawla@1
3 Replies

8. Shell Programming and Scripting

Delete to eol after pattern with sed

working on interactive ftp script saving log and want to remove the password from log so "quote PASS foofoo" would become "quote PASS XXXXXXX" replacing or removing the password is of no matter have tried several sed commands but have only been successful with character matching not pattern ... (2 Replies)
Discussion started by: ppaprota
2 Replies

9. Shell Programming and Scripting

Pass back return code for file delete failure

Hello Experts, This script to delete a file is submitted from an SAP system which has 2 servers. When it happens to run on server 1, the delete is successful. When it runs on server 2, the delete always fails. All user accounts and permissions have been adjusted to match on both servers. Is it... (5 Replies)
Discussion started by: SAPDEVEL
5 Replies

10. Shell Programming and Scripting

Read files into variable using then pass to delete call

I am trying read all the files from list into a variable line using bash. After there are read into the variable they are passed to a delete call. The files appear to be read line (as I can see them with the echo) by line into the variable, but the delete call is not removing them and I do not... (1 Reply)
Discussion started by: cmccabe
1 Replies
ftpd(8c)																  ftpd(8c)

Name
       ftpd - DARPA Internet File Transfer Protocol server

Syntax
       /usr/etc/ftpd [ -d ] [ -l ] [ -ttimeout ]

Description
       The  server  is	the  DARPA  Internet  File  Transfer  Protocol server process.	The server uses the TCP protocol and is invoked by when it
       receives a connection on the port specified in the service specification.  For further information, see

       The server currently supports the following requests.  Case is not distinguished.

       Request	Description

       ABOR	 Abort previous command

       ACCT	 Specify account

       ALLO	 Allocate storage

       APPE	 Append to a file

       CDUP	 Change to parent of current working directory

       CWD	 Change working directory

       DELE	 Delete a file

       HELP	 Give help information

       LIST	 Give list of files in a directory (ls -lg)

       MKD	 Make a directory

       MODE	 Specify data transfer mode

       NLST	 Give name list of files in directory (ls)

       NOOP	 Do nothing

       PASS	 Specify password

       PASV	 Prepare for server-to-server transfer

       PORT	 Specify data connection port

       PWD	 Print the current working directory

       QUIT	 Terminate session

       RETR	 Retrieve a file

       RMD	 Remove a directory

       RNFR	 Specify rename-from file name

       RNTO	 Specify rename-to file name

       STOR	 Store a file

       STOU	 Store a file with a unique name

       STRU	 Specify data transfer structure

       TYPE	 Specify data transfer type

       USER	 Specify user name

       XCUP	 Change to parent of current working directory

       XCWD	 Change working directory

       XMKD	 Make a directory

       XPWD	 Print the current working directory

       XRMD	 Remove a directory

       The remaining requests specified in Internet RFC 959 are recognized, but not implemented.

       The server interprets file names according to the globbing conventions used by This allows users to utilize the metacharacters *?[]{}~.

       The server authenticates users according to three rules:

       1.   The user name must be in the password database, and not have a null password.  In this case a password must be provided by the  client
	    before any file operations may be performed.

       2.   The user name must not appear in the file

       3.   If	the  user  name  is  anonymous	or an anonymous account must be present in the password file (user ftp).  In this case the user is
	    allowed to log in by specifying any password (by convention this is given as the client host's name).

       In the last case, takes special measures to restrict the client's access privileges.  The server performs a command to the  home  directory
       of the user. To prevent system security from being breached, it is recommended that the subtree be constructed with care.  Thus the follow-
       ing rules are recommended:

       ~ftp)	 Make the home directory owned by and unwritable by anyone.

       ~ftp/bin) Make this directory owned by the superuser and unwritable by anyone.  The program must be present to support the  list  commands.
		 This program should have mode 111.

       ~ftp/etc) Make this directory owned by the superuser and unwritable by anyone.  The files and must be present for the command to work prop-
		 erly.	These files should be mode 444.

       ~ftp/pub) Make this directory mode 777 and owned by Place the files, which are to be accessible by the anonymous account,  in  this  direc-
		 tory.

Options
       -d   Enables certain debugging messages that are printed by ftpd.

       -l   Logs each ftp session to the

       -t   Sends the inactivity timeout period to timeout; otherwise, the server will timeout an inactive session after 15 minutes.

Restrictions
       Support does not exist for aborting commands.

       The use of an anonymous account is inherently dangerous and should be avoided when possible.

       The  server  must  run  as  the superuser to create sockets with privileged port numbers.  The server maintains an effective user id of the
       logged in user, reverting to the superuser only when binding addresses to sockets.  The possible security holes have been extensively scru-
       tinized, but are possibly incomplete.

Files
       Contains the list of unauthorized users

See Also
       ftp(1c), services(5), inetd(8c), syslog(8)

																	  ftpd(8c)
All times are GMT -4. The time now is 08:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy