Sponsored Content
Top Forums Shell Programming and Scripting Not to Escape Backslash in script Post 302997743 by Thala on Thursday 18th of May 2017 06:39:48 PM
Old 05-18-2017
\\ worked in .netrc file!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script -- problem reading backslash(\)!!

Hello! I am writing a program that reads a bunch of arguments from the command line,then read information from a file(passed as one of the arguments) and do some computation. The problem I am facing is when a backslash(\) is present as one of the arguments, suppose $ myprog \ abc xyz,the backslash... (2 Replies)
Discussion started by: rossi143
2 Replies

2. UNIX for Dummies Questions & Answers

Escaping backslash

I have a variable containt something like this, c:\mask\mask. How can I escape "\" in the values? I want the value as it it. (9 Replies)
Discussion started by: swmk
9 Replies

3. UNIX for Dummies Questions & Answers

Need help to escape special characters in Korn shell script

Hi, I would like to display the following message from my shell (Korn) script Copy "old_file.txt" to "new_file.txt" My code looks as follows print "Copy "old_file.txt" to "new_file.txt"" However, when I execute the script, I get the following output Copy old_file.txt to... (6 Replies)
Discussion started by: rogers42
6 Replies

4. Shell Programming and Scripting

Problem in expect script with password involving trailing backslash

Hi all, I have wriiten an expect script that genearates a public private key pair through ssh-keygen and then copies that key to the authorized keys file of the remote system . The problem i am facing is when i get a password for the remote machine containg a trailing backslash , the send command... (4 Replies)
Discussion started by: pradeeptyagi23
4 Replies

5. Shell Programming and Scripting

SED script to backslash special characters

I have a shell script that I have written to be a kind of to-do/notepad that's quickly executable from the command line. However, special characters tend to break it pretty well. Ie: "notes -a This is an entry." works fine. "notes -a This is (my) entry." will toss back a bash syntax error on... (5 Replies)
Discussion started by: skylersee
5 Replies

6. Shell Programming and Scripting

'watch' not interpreting escape codes in bash script

Hi there, I'm fairly new to bash scripting and already having some troubles. I'm making a script that can print some series of strings in colors based in the information of a file, for simplicity let's say it only does: #!/bin/bash printf "\eWhen you execute this in the command line it... (1 Reply)
Discussion started by: Arashi
1 Replies

7. 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

8. Shell Programming and Scripting

How to print backslash in shell script using awk?

I found that echo "aaa" | awk '{print ",\\";}' works, and it will give "\". but ddd=`echo "aaa" | awk '{print ",\\";}'`; echo $ddd will not work. Could anyone tell me why? thank you. (8 Replies)
Discussion started by: wxuyec
8 Replies

9. Shell Programming and Scripting

Auto escape script to escape special chars in script args

This is a bit off the wall, but I often need to run scripts where there are argument values that contain special characters. For example, $ ./process.exe -t M -N -o temp.mol.s -i ../molfiles/N,N\',N\'\'-trimethylbis\(hexamethylene\)triamine.mol && sfile_space_to_tab.sh temp.mol.s temp.s It... (1 Reply)
Discussion started by: LMHmedchem
1 Replies

10. Shell Programming and Scripting

[BASH] Getting a semi-tailing backslash when passing (escaped) variables to script

Heyas Figured me had a 'typo' in tui-conf-set, i went to fix it. Now, i also figured, it might be nice to have tui-conf-set report (to console, not only exit code) wether it could save the variable to the file or not. This said, I appended this code: (the tui-title and tui-echo lines are... (3 Replies)
Discussion started by: sea
3 Replies
netrc(4)						     Kernel Interfaces Manual							  netrc(4)

NAME
netrc, .netrc - Specifies automatic login information for ftp SYNOPSIS
$HOME/.netrc DESCRIPTION
The .netrc file contains the information used by the automatic login (autologin) feature of the ftp command. It is a hidden file in your home directory and must be owned by the user logging in, or by the root user. If the .netrc file contains a login password, the file's permissions must be set to 600 (read and write by owner only). The .netrc file can contain the following entries (separated by spaces, tabs, or newlines): Where host is the name of a remote host. This entry begins the definition of the autologin process for the specified host. All following entries up to the next machine entry or the end of the file apply to that host. This is the same as machine, except that default matches any name. There can be only one default token, and it must appear after all machine tokens. This is normally used as follows: default login anonymous password user@site The preceding command line gives the user automatic anonymous ftp login to machines not specified in .netrc. This can be overriden by using the -n flag to disable autologin. Where user is the username to use at the remote host. If this entry is found, the autologin process initiates a login using the specified name. If this entry is missing, the autologin process fails. Where password is the login password to be used. The autologin process supplies this password to the remote server. A login password must be established at the remote host and that pass- word must be entered in this file, or the autologin process fails and you are prompted for the login password. Where password is the account password to be used. If this entry is found and an account password is required at the remote host, the autologin process supplies the password to the remote server. If the remote host requires an account password but this entry is missing, the autologin process prompts for the account password. Where macro is the name of an ftp subcommand macro. The macro definition starts on the following line and is defined to contain all of the following ftp subcommands up to the next blank line. If the macro is named init, ftp executes the macro upon successful completion of the autologin process. FILES
Contains automatic login information. RELATED INFORMATION
Commands: ftp(1). delim off netrc(4)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy