PDA

View Full Version : suse11sp1, execute "pwd | awk -F\/ '{print $NF}'" at csh,err



sujunfeng
14-Sep-2012, 14:01
suse11sp1,when a user's shell is csh, execute "pwd | awk -F\/ '{print $NF}'" , the result like bellow:
server1 /root# pwd | awk -F\/ '{print $NF}'
root
Missing }.
server1 /root#
but when user's shell is bash or ksh ,the result is normal ,like bellow :
server1 /root# pwd | awk -F\/ '{print $NF}'
root
server1 /root#

malcolmlewis
14-Sep-2012, 14:39
Hi
This is the incorrect forum for your question, so will move to the SLES Configure-Administer one.

To nntp users, no replies please and will advise when it's moved.

malcolmlewis
14-Sep-2012, 14:50
suse11sp1,when a user's shell is csh, execute "pwd | awk -F\/ '{print $NF}'" , the result like bellow:
server1 /root# pwd | awk -F\/ '{print $NF}'
root
Missing }.
server1 /root#
but when user's shell is bash or ksh ,the result is normal ,like bellow :
server1 /root# pwd | awk -F\/ '{print $NF}'
root
server1 /root#
Hi
Thread moved and reopened.

jmozdzen
17-Sep-2012, 14:37
Hi sujunfeng,

I cannot reproduce:


me@here:~> pwd | awk -F\/ '{print $NF}'
me
me@here:~> csh
here /home/me> pwd | awk -F\/ '{print $NF}'
me
here /home/me> cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

Regards,
Jens