03-09-2011
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
In a foreach loop I end up with $file containing the filename INCLUDING the whole path. I want this reduced to just the filename, but I can't seem to remember how I did it some years back. I am sure I can do it with "sed", but I am pretty sure I have seen a simpler command.
Anyone?
borgeh (3 Replies)
Discussion started by: borgeh
3 Replies
2. Shell Programming and Scripting
hi,
i need to replace a line a file with a new raw device location..
original file..
/opt/sybase/ASE1502/ASE-15_0/bin/dataserver \
-d/data/TST_AKS1/sybdevices/master.dat \
-e/logs/sybase/TST_AKS1/SFO_TST_AKS1.log \
-c/apps/sybase/ASE1502/ASE-15_0/TST_AKS1.cfg \... (2 Replies)
Discussion started by: aksaravanan
2 Replies
3. Windows & DOS: Issues & Discussions
hey im writing batch program for the first time and i have almost finished it the only problem is that i want to extract basename from absolute path
for eg :
if my first argument is c:\abcd\xyz\temp.txt then i want only temp.txt in variable.
and how do i extract some part from string for eg... (1 Reply)
Discussion started by: zedex
1 Replies
4. Shell Programming and Scripting
the script on excution should take a directory path from useran a numric input and it should check indicate whether its write or not?
if the cmmd sh<script-name>,dir/path.<500>" is greater than 500 in size should be copied to dir ,temp in pwd and display the mesage'files of 2000 bytes hav been... (4 Replies)
Discussion started by: arukr
4 Replies
5. Shell Programming and Scripting
Hi all,
I know this has been covered a lot, I have been searching and reading for hours on the subject, however so far I have been unsuccessful at accomplishing the goal using sed.
I know this can be done with parameter expansion (Thanks cfajohnson for a great explanation of parameter... (5 Replies)
Discussion started by: Festus Hagen
5 Replies
6. Shell Programming and Scripting
Hi
I need a script which will remove a path from PATH environment variable. For example
$echo PATH
/usr/local/bin:/usr/bin:test/rmve:/usr/games
$echo rmv
test/rmve
Here I need a shell script which will remove rmv path (test/rmve) from PATH... (9 Replies)
Discussion started by: madhu84
9 Replies
7. Shell Programming and Scripting
Hi Experts,
need one help.. m writing a shell script for which i need the entire path of the file but without its extension.
running the below script gives error at the statement DIR = `dirname $FILE` --command not found.
#!/bin/bash
jar xvf *jar
for FILE in `find . -name "*.class"`
... (3 Replies)
Discussion started by: amicableperson
3 Replies
8. Shell Programming and Scripting
Hello,
I have the string "/a/b/c/ddd.txt" and i want to get only the filename, in this case "ddd.txt". I have as something known in the script the pattern "/a/b/c/", so I`ve tried something like:
echo "/a/b/c/ddd.txt" | cut -d "/a/b/c/" -f2
but it doesn`t go, any help?.
thanks,
bye (2 Replies)
Discussion started by: rubber08
2 Replies
9. Shell Programming and Scripting
Hi all! i have a question how do you sort the filename of a path directory according to alphabetic order.
Example: sort according to highlighted text. There maybe space for filename
Path=/home/pikamon/Desktop/ABC;
Path=/home/pikamon/Desktop/ABD;
Path=/home/pikamon/Desktop/Riduan la;... (5 Replies)
Discussion started by: pikamon
5 Replies
10. UNIX for Beginners Questions & Answers
Hello.
Source file are in : /a/b/c/d/e/f/g/some_file
Destination is : /d/e where sub-directories "f" and "g" may missing or not.
After copying I want /a/b/c/d/e/f/g/file1 in /d/e/f/g/file1
On source /a is top-level directory
On destination /d is top-level directory
I would like... (2 Replies)
Discussion started by: jcdole
2 Replies