![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mailx Issue with -r flag | superdelic | UNIX for Dummies Questions & Answers | 1 | 01-22-2008 08:06 AM |
| Shell to run one after another checking any flag or file | konark | Shell Programming and Scripting | 3 | 12-28-2007 12:27 PM |
| Help regarding Error message: A test command parameter is not valid | skyineyes | Shell Programming and Scripting | 5 | 06-29-2007 02:38 AM |
| Retaining value in var for flag. | videsh77 | Shell Programming and Scripting | 4 | 05-31-2005 07:44 PM |
| Bad Audit Flag | wobitu | HP-UX | 1 | 09-29-2004 02:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
pwd: A specified flag is not valid for this command.
Probably a very straight forward question but please be easy on me, I am v. new to UNIX!
A script that I have runs the line tmp=`pwd -H` It works fine, but I needed to make a couple of other changes to the script, nowhere near this line but now this line reports: pwd: A specified flag is not valid for this command. When I use the original script again there is no problem at all. Any ideas as to what may be causing this. Cheers |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
What O.S. / shell do you use?
uname -a echo $SHELL I've never seen an H option for pwd.. only L and P. Does the top of the script say anything like /bin/sh or anything like that? Are there any other instances of pwd anywhere in the script? |
|
#3
|
||||
|
||||
|
Actually I kinda think that I have seen a -H option to pwd, but I'm not completely sure and I can't find any evidence of it. Still, my feeling is that -H meant hard and there was a -S which meant soft or symbolic, with -S being the default. If this is right, the -H would now be -P or a Posix compliant system. For pwd to be able to distingish between a physical and a logical path it must be a shell built-in. So the -H would be specific to some shell that I came across sometime after symbolic links were invented and before Posix standardized the pwd options.
And there is another possibility... circa 1980, pwd was not built-in to the shell. The shell had to invoke a separate program to run pwd. That program ignored its arguments. The SunOs /usr/bin/pwd seems to still behave like that. If this is very old script, the -H could be an error that seemed to work when the script ran with an older shell. In any event, the change being made to the script is possibly triggering the execution of that pwd line. And prior to the change, the script didn't happen to reach that path. |
||||
| Google The UNIX and Linux Forums |