Sponsored Content
Top Forums Shell Programming and Scripting sed command working different in linux environment. Post 302576532 by CarloM on Friday 25th of November 2011 06:15:00 AM
Old 11-25-2011
'unix env' does not mean very much. Which OSs are you actually talking about?

whence is most likely returning nothing because the directory containing the script is not in $PATH - which is nothing to do with differences in the OS, you just have them set up differently.

Whether ${PWD} will work depends on how and where the script is being run.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sed command not working

Hi, I have a test file as follows: 1G102119 ^ AA1179291 ^ 06oct2006 09:50:35^ 73.4^ 2^ 13^ 0^ 1493 1G102119 ^ AA1179291 ^ 06oct2006 09:49:45^ 73.4^ 2^ 13^ 0^ 1493 1G102119 ^ AA1179291 ^ 06oct2006 09:48:58^ 73.4^ 2^ 17^ 0^ 2 1G102119 ... (9 Replies)
Discussion started by: shashi_kiran_v
9 Replies

2. Shell Programming and Scripting

sed command not quite working yet, if anyone can help appreciated

Hi gang, I am trying to create some batch commands for many html pages I need to re-format. I am trying the number 2b in this example to wrap anchor tags around the number that will be referenced in the footnotes. I am trying to use the h/H hold command, but I have never tried using it... (2 Replies)
Discussion started by: naphelge
2 Replies

3. Shell Programming and Scripting

sed find and replace command not working

Hi, Am trying to replace a character '-' with 'O' in position 289 in my file but am not success with below command. sed 's/^\(.\{289\}\)-/\1O/' filename sed: 0602-404 Function s/^\(.\{289\}\)-/\1O/ cannot be parsed. Thanks in Advance Sara Video tutorial on how to use code tags in The... (9 Replies)
Discussion started by: Sara183
9 Replies

4. Shell Programming and Scripting

Why is this command not working? (sed)

Hi guys, the command is echo "Online Memory : 32768 MB" | sed 's/.*\(+\).*/\1/' I would expect it to print 32768, it cuts off any character to the first digit, then gets all digits in 1, cuts off the rest after the digits, and should print 32768, instead it... (4 Replies)
Discussion started by: funksen
4 Replies

5. Shell Programming and Scripting

sed command not working

Hi All, I am trying to run a sed command to replace a string in a file. sed -i -e "s/$Job_status_old ,$line/Job_status_new ,$line/g" stat.txt The command wen run from the command promt works fine. But the same command does not work when its put in a script. The script is not failing... (3 Replies)
Discussion started by: samyamkrishna
3 Replies

6. Shell Programming and Scripting

sed command not working

cat bipin.txt Unix is an OS Unix has its own commmands Unix is a user friendly OS Unix is platform independent Unix is a time sharing OS the best OS to learn is Unix Abinitio uses Unix in backend this is my file when i use sed 's/Unix/Linux/' bipin.txt all the occurences are getting... (0 Replies)
Discussion started by: Bipin_1991
0 Replies

7. UNIX for Beginners Questions & Answers

sed command not working properly

This is my sample file cat bipin.txt Unix is an OS Unix has its own commmands Unix is a user friendly OS Unix is platform independent Unix is a time sharing OS the best OS to learn is Unix Abinitio uses Unix in backend When i use sed 's/Unix/Linux/' bipin.txt , only the first... (2 Replies)
Discussion started by: Bipin_1991
2 Replies

8. UNIX for Beginners Questions & Answers

sed command not working

Hello There - Iam trying to get this expdp running for oracle backup. And this is the code below: ### Run the export. ### Comment out any LOGFILE parameters in the .par file. if grep -i "Logfile" /<Path>$1_$2_$3.par; then ## Comment out any LOGFILE... (7 Replies)
Discussion started by: bkilaru
7 Replies

9. Shell Programming and Scripting

Disk Space Utilization in HTML format working in one environment and not working on the other

Hi Team, I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system. df -h | awk -v host=`hostname` ' BEGIN { print "<table border="4"... (13 Replies)
Discussion started by: Harihsun
13 Replies

10. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
0ALIAS(1)																 0ALIAS(1)

NAME
0alias -- create quick scripts to run 0launch SYNOPSIS
0alias ALIAS [INTERFACE [MAIN]] DESCRIPTION
Having to keep typing the full URI for a program each time you want to run it with 0launch is annoying. 0alias will create a little script in your PATH to do it for you. Note: the newer "0install add" command provides a more efficient alternative to using aliases. EXAMPLES
A program can be invoked using 0launch: 0launch http://rox.sourceforge.net/2005/interfaces/Edit To avoid having to keep entering the URI, create an alias: 0alias rox-edit http://rox.sourceforge.net/2005/interfaces/Edit To run Edit now: rox-edit To select a different version, or check for updates: 0alias rox-edit If an interface provides more than one program, you can specify which one to use instead of the default. e.g. 0alias svn http://example.com/subversion 0alias svnadmin http://example.com/subversion svnadmin (this is for older programs that use MAIN; for newer programs you may need to use --command instead) COMMAND-LINE OPTIONS -c=COMMAND, --command=COMMAND The generated script will execute COMMAND rather than the default ("run"). -d=DIR, --dir=DIR Install the script into directory DIR, rather than searching for a suitable directory in $PATH. -h, --help Show the built-in help text. -m, --manpage Display the manpage for the alias script given as the single argument. The alias can be an absolute pathname, or the name of a script in $PATH. If the argument isn't an alias script, or if multiple arguments are given, then all arguments are passed to the system 'man' command. This allows you to alias your man command like this: alias man='0alias --manpage' -r, --resolve Print the interface URI for the given alias script to stdout. -V, --version Display version information. LICENSE
Copyright (C) 2012 Thomas Leonard. You may redistribute copies of this program under the terms of the GNU Lesser General Public License. BUGS
Please report bugs to the developer mailing list: http://0install.net/support.html AUTHOR
The Zero Install Injector was created by Thomas Leonard. SEE ALSO
0install(1), 0launch(1), 0desktop(1) The Zero Install web-site: http://0install.net Thomas Leonard 2012 0ALIAS(1)
All times are GMT -4. The time now is 10:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy