09-24-2013
It can be any character as long as its not in the text and a control character.
What about ¤, is it better then §
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
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
3. 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
4. Shell Programming and Scripting
I have a text file with full list of files with their full path. I wanted to sort it by directory then files then subdirectory by alphabetically. When I used the sort command it doesn't give like what I want. Could somebody help me on this.
Here is the ex:
This is what I'm getting... (2 Replies)
Discussion started by: javidraaj
2 Replies
5. 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
6. 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
7. Shell Programming and Scripting
Hi,
I have a list of paths with files at the end. How can strip off filenames.
This is what I have:
/apps/test/abc/file.txt
/apps/new/home/daily/report.xml
/apps/old/home/weekly/out/test.sh
This is what I need:
/apps/test/abc/
/apps/new/home/daily/
/apps/old/home/weekly/out/
... (10 Replies)
Discussion started by: djanu
10 Replies
8. Shell Programming and Scripting
Hi,
Here's my problem:
I have a file "tmp.txt" created by the find command that contain a list of files that meet certain criteria. I need to sort the files using the filenames only not taken into consideration the path:
Example for tmp.txt =
/tmp/usr/a.txt
/tmp/bdir/b.txt
Using... (12 Replies)
Discussion started by: snappy46
12 Replies
9. Shell Programming and Scripting
Hi All
I've googled around for this and can't see a way of doing it.
I have a file that contains a number of records that are layed out something like the following.
/path/to/directory/that/contains/a/file/I/need/filename.pdf
The path itself can vary both in terms of the names and the... (7 Replies)
Discussion started by: Bashingaway
7 Replies
10. Shell Programming and Scripting
Hello ,
I have to write a bash script. I will explain the logic based on a scenario.
Scenario :
Suppose I have few files in a Folder X :
FILE_201508.list
FILE_201510.list
FILE_201507.list
abc_201510.csv
xyz_201508.csv
abc_201507.csv
def_201507.csv
1) Now ,... (3 Replies)
Discussion started by: smamrm
3 Replies