Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find & remove characters in filenames Post 302582786 by radoulov on Sunday 18th of December 2011 08:26:04 AM
Old 12-18-2011
Yes, or execute it directly on the command prompt.
This User Gave Thanks to radoulov For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl code to search for filenames that contain special characters

Hello, I have a requirement to search a directory, which contains any number of other directories for file names that contain special characters. directory structure DIR__ |__>DIR1 |__>DIR2__ |__>DIR2.1 |__>DIR2.2 |__>DIR3 .. ... (8 Replies)
Discussion started by: jerardfjay
8 Replies

2. Shell Programming and Scripting

Script to find and remove characters

Hi. I have many files in a folder, and even more in the subfolders. I need a script that finds and removes certain characters (them being /n in this one) in the files in the folder and it's subfolders. So, could someone write me a script that works in Linux, does this: Searchs for "/n" in... (5 Replies)
Discussion started by: Zerby
5 Replies

3. Shell Programming and Scripting

Filenames created with '\r' characters at the end

Hi all, Am creating files and doing copy,compare and deletion. As i do not want to mention the filepath everywhere, i store the filepaths in variables. FILENAME="/home/test/create/Myfile.txt" WR_PATH="/home/test/wrie/writefile.txt" RD_PATH="/home/test/myread/readfile.txt" echo "This is my... (2 Replies)
Discussion started by: amio
2 Replies

4. Shell Programming and Scripting

Bash script - stripping away characters that can't be used in filenames

I want to create a temp file which is named based on a search string. The search string may contain spaces or characters that aren't supposed to be used in filenames so I want to strip those out. My thought was to use 'tr' with but the result is the opposite of what I want: $ echo "test... (5 Replies)
Discussion started by: mglenney
5 Replies

5. Shell Programming and Scripting

Find duplicate filenames and remove in different mount point

Hi Gurus, Do any kind souls encounter have the same script as mentioned here. Find and compare filenames in different mount point and remove duplicates. Thanks a million!!! wanna13e (7 Replies)
Discussion started by: wanna13e
7 Replies

6. Shell Programming and Scripting

Single/Multiple Line with Special characters - Find & Replace in Unix Script

Hi, I am creating a script to do a find and replace single/multiple lines in a file with any number of lines. I have written a logic in a script that reads a reference file say "findrep" and populates two variables $FIND and $REPLACE print $FIND gives Hi How r $u Rahul() Note:... (0 Replies)
Discussion started by: r_sarnayak
0 Replies

7. Shell Programming and Scripting

Perl: windows filenames escape characters

I have a perl find program that will find all files of window application stored on unix disks. Ofcourse these files contain all the weird characters windows allows, but on *nix pukes out all kinds of unwanted effects when processing these. Is their a utility that will escape all these... (3 Replies)
Discussion started by: karelb
3 Replies

8. Shell Programming and Scripting

How best to remove certain characters from filenames and folders recursively

hello, I'm trying to figure out which tool is best for recursively renaming and files or folders using the characters \/*?”<>| in their name. I've tried many examples that use Bash, Python and Perl, but I'm not much of a programmer I seem to have hit a roadblock. Does anyone have any... (15 Replies)
Discussion started by: prometheon123
15 Replies

9. Shell Programming and Scripting

Delete characters & find unique IP addresses with port

Hi, I have a file having following content. <sip:9376507346@97.208.31.7:51088 <sip:9907472291@97.208.31.7:51208 <sip:8103742422@97.208.31.7:51024 <sip:9579892841@97.208.31.7:51080 <sip:9370904222@97.208.31.7:51104 <sip:9327665215@97.208.31.7:51104 <sip:9098364262@97.208.31.7:51024... (2 Replies)
Discussion started by: SunilB2011
2 Replies

10. UNIX for Beginners Questions & Answers

To remove any invisible and special characters from the file(exclude @!#$&*)

Hi Guys, My requirement is to remove any invisible and special characters from the file like control M(carriage return) and alt numerics and it should not replace @#!$% abc|xyz|acd¥£ó adc|123| 12áí Please help on this. Thanks Rakesh (1 Reply)
Discussion started by: rakeshp
1 Replies
PASSWORD-PROMPT(8mandos)					   Mandos Manual					  PASSWORD-PROMPT(8mandos)

NAME
password-prompt - Prompt for a password and output it. SYNOPSIS
password-prompt [--prefix PREFIX | -p PREFIX] [--debug] password-prompt {--help | -?} password-prompt --usage password-prompt {--version | -V} DESCRIPTION
All password-prompt does is prompt for a password and output any given password to standard output. This program is not very useful on its own. This program is really meant to run as a plugin in the Mandos client-side system, where it is used as a fallback and alternative to retrieving passwords from a Mandos server. This program is little more than a getpass(3) wrapper, although actual use of that function is not guaranteed or implied. OPTIONS
This program is commonly not invoked from the command line; it is normally started by the Mandos plugin runner, see plugin-runner(8mandos). Any command line options this program accepts are therefore normally provided by the plugin runner, and not directly. --prefix=PREFIX, -p PREFIX Prefix string shown before the password prompt. --debug Enable debug mode. This will enable a lot of output to standard error about what the program is doing. The program will still perform all other functions normally. --help, -? Gives a help message about options and their meanings. --usage Gives a short usage message. --version, -V Prints the program version. EXIT STATUS
If exit status is 0, the output from the program is the password as it was read. Otherwise, if exit status is other than 0, the program has encountered an error, and any output so far could be corrupt and/or truncated, and should therefore be ignored. ENVIRONMENT
CRYPTTAB_SOURCE, CRYPTTAB_NAME If set, these environment variables will be assumed to contain the source device name and the target device mapper name, respectively, and will be shown as part of the prompt. These variables will normally be inherited from plugin-runner(8mandos), which will normally have inherited them from /scripts/local-top/cryptroot in the initial RAM disk environment, which will have set them from parsing kernel arguments and /conf/conf.d/cryptroot (also in the initial RAM disk environment), which in turn will have been created when the initial RAM disk image was created by /usr/share/initramfs-tools/hooks/cryptroot, by extracting the information of the root file system from /etc/crypttab. This behavior is meant to exactly mirror the behavior of askpass, the default password prompter. BUGS
None are known at this time. EXAMPLE
Note that normally, command line options will not be given directly, but via options for the Mandos plugin-runner(8mandos). Normal invocation needs no options: password-prompt Show a prefix before the prompt; in this case, a host name. It might be useful to be reminded of which host needs a password, in case of KVM switches, etc. password-prompt --prefix=host.example.org: Run in debug mode. password-prompt --debug SECURITY
On its own, this program is very simple, and does not exactly present any security risks. The one thing that could be considered worthy of note is this: This program is meant to be run by plugin-runner(8mandos), and will, when run standalone, outside, in a normal environment, immediately output on its standard output any presumably secret password it just received. Therefore, when running this program standalone (which should never normally be done), take care not to type in any real secret password by force of habit, since it would then immediately be shown as output. To further alleviate any risk of being locked out of a system, the plugin-runner(8mandos) has a fallback mode which does the same thing as this program, only with less features. SEE ALSO
intro(8mandos) crypttab(5) mandos-client(8mandos) plugin-runner(8mandos), COPYRIGHT
Copyright (C) 2008-2009, 2011-2012 Teddy Hogeborn, Bjorn Pahlsson This manual page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Mandos 1.5.5 2012-01-01 PASSWORD-PROMPT(8mandos)
All times are GMT -4. The time now is 01:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy