Sponsored Content
Top Forums Shell Programming and Scripting expanding dotted paths to absolute ones in bash or sh Post 77837 by TanRanger on Wednesday 13th of July 2005 08:59:34 AM
Old 07-13-2005
Thanks, Pixelbeat. I'm new to *nix but I gather "realpath" is standard equipment so I assume this should still be portable. I try to stay in the habit of writing portable code whenever I have the luxury (or whenever I'm getting paid by the hour Smilie).

I condensed your two lines into one and it has shortened my code by quite a few lines. Just in time, too, as I notice I was a little sloppy in my handling of error conditions. If only all of the users could be counted on to know what I had in mind.
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Dotted thread icons

Can you guys please enable the "dotted" icon option, so that the thread icon for a thread in which a user has posted in will appear with a dot in it? Thanks, Aaron (2 Replies)
Discussion started by: Spetnik
2 Replies

2. AIX

Is there a way to list all the functions dotted in to the env?

Hi People, Please advise if there is a command to retrieve the list of functions (user-defined) available at any certain point? Cheers (1 Reply)
Discussion started by: easwam
1 Replies

3. UNIX for Dummies Questions & Answers

Expanding variables with Ed Bash 3.2.33

Hi, The following code finds the line containing fruits in test.txt and replaces instances of apple with banana. ed -s test.txt <<< $'/fruits/s/apple/banana/g\nw' What I want to do is put variables in the place of fruits, apple and banana. I have tried replacing ' with " to get... (2 Replies)
Discussion started by: de_la_espada
2 Replies

4. UNIX for Dummies Questions & Answers

Absolute and Relative Paths?

Can someone cofirm that I have got the paths correct here? :confused: $PATH_TO_TMP_DIR='/tmp'; #$PATH_TO_TMP_DIR='home/tmp'; $PATH_TO_YOUR_IMG_DIR = '/temp_images'; #$PATH_TO_YOUR_IMG_DIR = 'home/public_html/Midwich/temp_images'; Thanks (1 Reply)
Discussion started by: stubie
1 Replies

5. Shell Programming and Scripting

how to remove absolute paths from zip archive

Hi, I need to write an bash script which works like it can copy files from remote machine through ssh to the server where script is running in zip format with the structure i want. I don't want to get absolute path in zip archive. Please let me know how it can be possible. ssh... (4 Replies)
Discussion started by: mirfan
4 Replies

6. Solaris

exclude absolute paths when extracting Tar file?

Hi, How do I extract data from TAR excluding absolute paths for Tar? (Solaris) Thanks (3 Replies)
Discussion started by: zam
3 Replies

7. Shell Programming and Scripting

Is it possible to change paths inside a bash script?

i have some script with some paths inside it. The idea is to some files which is on desktop copy and move to another location. Problem is that inside script is similar to this: cp test1.zip /root/help/ because I allways have another zip files, does it possible to have some input which ask me... (18 Replies)
Discussion started by: tomislav91
18 Replies

8. Shell Programming and Scripting

Show only the filenames under a directory without relative and absolute paths.

I am able to list all the filenames under a directory & its sub-directories except blent.tar on Linux find "/tmp/" -type f | grep -v blent.tar | rev | cut -d '/' -f1 | rev Desired Output: THIRDPARTYLICENSEREADME.txt javaws libjavaplugin_oji.so libjavaplugin_oji.so... (3 Replies)
Discussion started by: mohtashims
3 Replies

9. UNIX for Beginners Questions & Answers

Bash argument not expanding in script

I pass an argument to bash as run. The first command in green executes as expected, however the second in blue fails as the $run does not expand. I tried to escape the variable with \ thinking the quotes were making the literal translation and also "${run}" but both did not work to expand the... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. UNIX for Beginners Questions & Answers

[BASH] eval command not expanding variables as expected.

Hi Guys, I wrote a collection of bash functions years ago and now need to use them again but I'm getting some error messages when eval tries to expand the variables names. I recollect that I used the shopt command to set one of the options but I can't quite remember the command that I... (8 Replies)
Discussion started by: ASGR
8 Replies
GALLERY-UPLOADER(1)					   gallery-uploader User Manual 				       GALLERY-UPLOADER(1)

NAME
gallery-uploader - program to upload pictures and video to Gallery SYNOPSIS
gallery-uploader [FILES] DESCRIPTION
This manual page documents briefly the gallery-uploader command. gallery-uploader is a program that allows to easily upload pictures and video to Gallery installations; Gallery (- http://gallery.menalto.com) is an advanced web photo album organizer. If FILES are given, they are the files which must be uploaded. If no argument is given instead, a small browser window will open where the user can select items to upload. HOW TO ENABLE AS NAUTILUS SCRIPT
Nautilus, GNOME's default file manager, supports scripts, which can be activated on any selected file(s) from the right-button menu; gallery-uploader plays perfectly the role of a Nautilus script. To enable it, the user can run in a terminal the command: ln -s /usr/share/nautilus-scripts/Gallery Uploader.py ~/.gnome2/nautilus-scripts/Gallery Uploader or use a program such as nautilus-scripts-manager; see: http://www.pietrobattiston.it/nautilus-scripts-manager. AUTHOR
Pietro Battiston <me@pietrobattiston.it> developed the program and wrote this manpage. COPYRIGHT
Copyright (C) 2010 Pietro Battiston Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2. gallery-uploader 03/29/2011 GALLERY-UPLOADER(1)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy