What prefix backslash does to command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers What prefix backslash does to command
# 1  
Old 12-02-2009
What prefix backslash does to command

In unix when I run rm command, it asks for file removal confirmation e.g.

rm netmail_log.csv
rm: remove netmail_log.csv (yes/no)? n

But if
i prefix backslash to rm it does not ask for confirmation. Does anyone know what backslash does to command or shell ?

e.g.
\rm netmail_log.csv
# 2  
Old 12-02-2009
You must have rm aliased to rm -i in some config file somewhere. the backslash doesn't actually change the meaning of the command, but mangles it enough that your alias doesn't recognize it. This may actually be a bug.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help - Command to Subtract two numbers without losing prefix zeros

Hello, I have a variable LOGNUM with values 0000095, When i subtract the variable by 1, Its losing its leading zeros. Can you please help me here ? LOGNUM=0000095 $OLDLOG=`echo "${LOGNUM}-1"|bc` $ echo $OLDLOG 94 Am expecting output as 0000094 Appreciate your help! Thanks,... (11 Replies)
Discussion started by: prince1987
11 Replies

2. Shell Programming and Scripting

Extract Uniq prefix from a start and end prefix

Dear All, assume i have a file with content: <Start>6000</Start> <Stop>7599</Stop> the output is: 6000 7000 7100 7200 7300 7400 7599 how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix. Thanks Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies

3. Shell Programming and Scripting

Curl command to download multiple files with a file prefix

I am using the below curl command to download a single file from client server and it is working as expected curl --ftp-ssl -k -u ${USER}:${PASSWD} ftp://${HOST}:${PORT}/path/to/${FILE} --output ${DEST}/${FILE} let say the client has 3 files hellofile.101, hellofile.102, hellofile.103 and I... (3 Replies)
Discussion started by: r@v!7*7@
3 Replies

4. Shell Programming and Scripting

sed command escaping backslash "/"

Hello friends/'unix experts', i have a file as below cat sample.txt satish /rakesh/ sandhya /sandeep/ i have to replace /rakesh/ with rakesh, how can i do it with sed, i tried below code but its throwing errors sed -e 's/'"\(/rakesh/)\"'/\1rakesh/g' sample.txt ... (1 Reply)
Discussion started by: only4satish
1 Replies

5. UNIX for Dummies Questions & Answers

Replace backslash at the end of the string using sed command

I have text file which is a tab delimited one. Sample data from the file is shown below: unix is\ great\ os linux\ is superb I want to replace that backslash with empty string preserving the tab delimiter. Output should be unix is great os linux is ... (3 Replies)
Discussion started by: p.akhilreddy4u
3 Replies

6. Shell Programming and Scripting

Echo backslash

If I echo "\\" I get a backslash returned ~$ echo "\\" \ Why doesn't this work: string=`echo "\\"` echo $string I get the error message: bash: command substitution: line 1: unexpected EOF while looking for matching `"' bash: command substitution: line 2: syntax error: unexpected end... (2 Replies)
Discussion started by: locoroco
2 Replies

7. Shell Programming and Scripting

How to disable backslash in command line

Dear I have one problem in SCO Unix command line. I want to disable execution of commands with backslash. For example - if the user executes the following command \exec_script Here - i want the system should NOT execute this command. Can any one give me a suitable... (8 Replies)
Discussion started by: subbu62
8 Replies

8. UNIX for Dummies Questions & Answers

Backslash in find command

When I run my script in debug mode I see that \ is not getting executed as part of command. It is being treated as escape character. find ${DATABASE_PARAM_PATH} -mtime +${RETENTION_PERIOD} -exec rm -rf {} \; Command execution output in debug mode : find... (1 Reply)
Discussion started by: findprakash
1 Replies

9. UNIX for Dummies Questions & Answers

Use same filename for prefix in the split command

I want to execute something like this: find . -type f -regex '$REGEX' -print | xargs split -d -C $SIZE The problem is that I want the name of the split files to be the same name as original files. So if my directory has two files called abc.txt and def.txt, then I want the split files to be... (1 Reply)
Discussion started by: namityadav
1 Replies

10. Shell Programming and Scripting

ignoring backslash while executing command

Hi, I'm running into following issue, my_file is a collection of windows directories (i.e \\path\directory\file) . I need to be able to execute "my command" as my command \\path\directory\file I know that while read -r / print -r ignores backslashes. My code: cat $my_file | while read -r... (6 Replies)
Discussion started by: agalkin
6 Replies
Login or Register to Ask a Question