Date: Thu, 12 Apr 2007 10:28:54 +0200 From: "Aitor San Juan" <asanjuan@bolsabilbao.es> To: "FreeBSD Mailing List" <freebsd-questions@freebsd.org> Subject: Shell scripting: Absolute path name of a file given as parameter Message-ID: <33E0F3313625E543ACCC41AE2DFD5EF5024280@BB06.bolsabilbao.local> In-Reply-To: <6.0.0.22.2.20070319061205.0253b728@mail.computinginnovations.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi List, Just a simple question. I have developed a shell script that, among other things, shows the = filename that was specified as a parameter. However, when I invoke the script and the file is located in the current = working directory, it just shows: ./my_input_filename I'd like the script to show the full path name of the input file. I = wonder whether there is or not an equivalent to %~f1 (Windows Batch file = programming). This parameter extension expands parameter %1 ($1 in shell scripting = jargon) to a Fully qualified path name. Any hint would be highly appreciated. Thanks in advance. Aitor. ************ LEGEZKO OHARRA / AVISO LEGAL / LEGAL ADVICE *************=20 Mezu honek isilpeko informazioa gorde dezake, edo jabea duena, edota = legez babestuta dagoena. Zuri zuzendua ez bada, bidali duenari esan eta = ezabatu, inori berbidali edo gorde gabe, legeak debekatzen duelako = mezuak erabiltzea baimenik gabe.=20 -------------------------------------------------------------------------= - Este mensaje puede contener informaci=F3n confidencial, en propiedad o = legalmente protegida. Si usted no es el destinatario, le rogamos lo = comunique al remitente y proceda a borrarlo, sin reenviarlo ni = conservarlo, ya que su uso no autorizado est=E1 prohibido legalmente. -------------------------------------------------------------------------= - This message may contain confidential, proprietary or legally privileged = information. If you are not the intended recipient of this message, = please notify it to the sender and delete without resending or backing = it, as it is legally prohibited. *************************************************************************= *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33E0F3313625E543ACCC41AE2DFD5EF5024280>