syntax error near unexpected token `newline' in .bashrc [on hold]
up vote
-2
down vote
favorite
I'm trying to add script
function proxyset() {
proxy_enabled=true
NO_PROXY_DOMAINS=".abc.com,"
LOCAL_ADDRESSES="localhost"
USER=<USER_ID>
PASSWORD=<URL_ENCODED_PASSWORD>
SERVER=httppxgot.abc.com
PORT=8080
# Disable HTTP proxy
function proxyunset() {
unset NO_PROXY
echo 'Im unset!'
}
but when I'm opening cygwin terminal its showing
syntax error near unexpected token `newline'
-bash: /cygdrive/c/Users/XXX/.bashrc: line 214: ` USER=<USER_ID>'
whats is wrong with script
command-line bash bashrc
put on hold as off-topic by wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas Dec 16 at 11:03
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
-2
down vote
favorite
I'm trying to add script
function proxyset() {
proxy_enabled=true
NO_PROXY_DOMAINS=".abc.com,"
LOCAL_ADDRESSES="localhost"
USER=<USER_ID>
PASSWORD=<URL_ENCODED_PASSWORD>
SERVER=httppxgot.abc.com
PORT=8080
# Disable HTTP proxy
function proxyunset() {
unset NO_PROXY
echo 'Im unset!'
}
but when I'm opening cygwin terminal its showing
syntax error near unexpected token `newline'
-bash: /cygdrive/c/Users/XXX/.bashrc: line 214: ` USER=<USER_ID>'
whats is wrong with script
command-line bash bashrc
put on hold as off-topic by wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas Dec 16 at 11:03
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas
If this question can be reworded to fit the rules in the help center, please edit the question.
bash function doesn't accept-
in its name. Check that!
– mja
Dec 4 at 12:29
sure that works:function echo-test() { echo test ;}; echo-test
– Benibr
Dec 4 at 12:33
3
There is a missing close bracket for the firs function.
– pa4080
Dec 4 at 13:15
1
Cygwin is not Ubuntu.
– wjandrea
Dec 4 at 21:40
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
I'm trying to add script
function proxyset() {
proxy_enabled=true
NO_PROXY_DOMAINS=".abc.com,"
LOCAL_ADDRESSES="localhost"
USER=<USER_ID>
PASSWORD=<URL_ENCODED_PASSWORD>
SERVER=httppxgot.abc.com
PORT=8080
# Disable HTTP proxy
function proxyunset() {
unset NO_PROXY
echo 'Im unset!'
}
but when I'm opening cygwin terminal its showing
syntax error near unexpected token `newline'
-bash: /cygdrive/c/Users/XXX/.bashrc: line 214: ` USER=<USER_ID>'
whats is wrong with script
command-line bash bashrc
I'm trying to add script
function proxyset() {
proxy_enabled=true
NO_PROXY_DOMAINS=".abc.com,"
LOCAL_ADDRESSES="localhost"
USER=<USER_ID>
PASSWORD=<URL_ENCODED_PASSWORD>
SERVER=httppxgot.abc.com
PORT=8080
# Disable HTTP proxy
function proxyunset() {
unset NO_PROXY
echo 'Im unset!'
}
but when I'm opening cygwin terminal its showing
syntax error near unexpected token `newline'
-bash: /cygdrive/c/Users/XXX/.bashrc: line 214: ` USER=<USER_ID>'
whats is wrong with script
command-line bash bashrc
command-line bash bashrc
edited Dec 4 at 12:59
asked Dec 4 at 12:15
Sai prateek
973
973
put on hold as off-topic by wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas Dec 16 at 11:03
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas Dec 16 at 11:03
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – wjandrea, Kevin Bowen, Eric Carvalho, janos, Thomas
If this question can be reworded to fit the rules in the help center, please edit the question.
bash function doesn't accept-
in its name. Check that!
– mja
Dec 4 at 12:29
sure that works:function echo-test() { echo test ;}; echo-test
– Benibr
Dec 4 at 12:33
3
There is a missing close bracket for the firs function.
– pa4080
Dec 4 at 13:15
1
Cygwin is not Ubuntu.
– wjandrea
Dec 4 at 21:40
add a comment |
bash function doesn't accept-
in its name. Check that!
– mja
Dec 4 at 12:29
sure that works:function echo-test() { echo test ;}; echo-test
– Benibr
Dec 4 at 12:33
3
There is a missing close bracket for the firs function.
– pa4080
Dec 4 at 13:15
1
Cygwin is not Ubuntu.
– wjandrea
Dec 4 at 21:40
bash function doesn't accept
-
in its name. Check that!– mja
Dec 4 at 12:29
bash function doesn't accept
-
in its name. Check that!– mja
Dec 4 at 12:29
sure that works:
function echo-test() { echo test ;}; echo-test
– Benibr
Dec 4 at 12:33
sure that works:
function echo-test() { echo test ;}; echo-test
– Benibr
Dec 4 at 12:33
3
3
There is a missing close bracket for the firs function.
– pa4080
Dec 4 at 13:15
There is a missing close bracket for the firs function.
– pa4080
Dec 4 at 13:15
1
1
Cygwin is not Ubuntu.
– wjandrea
Dec 4 at 21:40
Cygwin is not Ubuntu.
– wjandrea
Dec 4 at 21:40
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
As it says, bash can not handle the line 214 in which the USER variable is set to
I don't know what you want to fill in there but the signs '<' and '>' are used in bash for redirecting output therefore the variable cannot be set.
Example:
bash-4.4$ USER=<USER_ID>
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test<
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test
bash-4.4$ echo $USER
test
If you want to get your actual username or id either use the command id
or look with export
for Environment Variables which already exists.
For more information about I/O redirection have a look at the docs: https://www.tldp.org/LDP/abs/html/io-redirection.html
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
As it says, bash can not handle the line 214 in which the USER variable is set to
I don't know what you want to fill in there but the signs '<' and '>' are used in bash for redirecting output therefore the variable cannot be set.
Example:
bash-4.4$ USER=<USER_ID>
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test<
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test
bash-4.4$ echo $USER
test
If you want to get your actual username or id either use the command id
or look with export
for Environment Variables which already exists.
For more information about I/O redirection have a look at the docs: https://www.tldp.org/LDP/abs/html/io-redirection.html
add a comment |
up vote
3
down vote
As it says, bash can not handle the line 214 in which the USER variable is set to
I don't know what you want to fill in there but the signs '<' and '>' are used in bash for redirecting output therefore the variable cannot be set.
Example:
bash-4.4$ USER=<USER_ID>
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test<
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test
bash-4.4$ echo $USER
test
If you want to get your actual username or id either use the command id
or look with export
for Environment Variables which already exists.
For more information about I/O redirection have a look at the docs: https://www.tldp.org/LDP/abs/html/io-redirection.html
add a comment |
up vote
3
down vote
up vote
3
down vote
As it says, bash can not handle the line 214 in which the USER variable is set to
I don't know what you want to fill in there but the signs '<' and '>' are used in bash for redirecting output therefore the variable cannot be set.
Example:
bash-4.4$ USER=<USER_ID>
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test<
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test
bash-4.4$ echo $USER
test
If you want to get your actual username or id either use the command id
or look with export
for Environment Variables which already exists.
For more information about I/O redirection have a look at the docs: https://www.tldp.org/LDP/abs/html/io-redirection.html
As it says, bash can not handle the line 214 in which the USER variable is set to
I don't know what you want to fill in there but the signs '<' and '>' are used in bash for redirecting output therefore the variable cannot be set.
Example:
bash-4.4$ USER=<USER_ID>
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test<
bash: syntax error near unexpected token `newline'
bash-4.4$ USER=test
bash-4.4$ echo $USER
test
If you want to get your actual username or id either use the command id
or look with export
for Environment Variables which already exists.
For more information about I/O redirection have a look at the docs: https://www.tldp.org/LDP/abs/html/io-redirection.html
answered Dec 4 at 12:26
Benibr
1312
1312
add a comment |
add a comment |
bash function doesn't accept
-
in its name. Check that!– mja
Dec 4 at 12:29
sure that works:
function echo-test() { echo test ;}; echo-test
– Benibr
Dec 4 at 12:33
3
There is a missing close bracket for the firs function.
– pa4080
Dec 4 at 13:15
1
Cygwin is not Ubuntu.
– wjandrea
Dec 4 at 21:40