Hi.
I'm trying to get the names of files from a log file, without the path and special characters.
I have a file that contains lines like this:
Code:
'/path/to/files/file00010000070874.EXT'
'/path/to/files/file00010000070875.EXT'
'/path/to/files/file00010000070876.EXT'
'/path/to/files/file00010000070877.EXT'
'/path/to/files/file00010000070878.EXT'
'/path/to/files/file00010000070879.EXT'
'/p
Guys,
I did a search on this but couldn't find any thing.
I need to add /home/scadm/scripts to the PATH. If I do the below it works for the session I'm in. If I close it and reopen it doesnt work.
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
Code:
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
Code:
/a/b/c/
/q/w/e/
How to get the same through shell script?
I have done till now:
Code:
while read file
do
cd <here need the directory path for
I am not an expert at Unix scripting.
Hi,
I have a directory with a bunch of files say around 150K.
I want the directory's path and the filenames printed to a text file.
Example:
If I am in the directory /path/test and the files in this directory are
Quote:
1.txt
2.txt
3.txt
My output file should be like this
Quote:
/path/test/1.txt
/path/test/
I am trying to write a very very simple script in Linux.
Let me show you the code first:
#!/bin/bash
# The shell program uses glob constructs and ls
# to list all entries in testfiles, that have 2
# or more dots "." in their name.
ls -l /path/to/file/*.*.*
When I run this code with bash myscript command, I get something like: /path/to/file/file.with.three.dots
But I don't want this.
Hi All,
How can i find and replace the one path to another path with in the file.
For Example:
Code:
Search_path=/search/path
replace_path=/replace/path
I used the following command but not usefull, please help me regarding the same.
Code:
sed 's_/search/path_/replace/path_' file_name > tmp_file.txt
I want to script a conversion of format of a space delimited list of filenames like this:
/path/to/some/file.ext /another/path/to/some other file that has spaces in the name /still/another path/bigfile
to a semicolon-space delimited list like this:
/path/to/some/file.ext; /another/path/to/some other file that has spaces in the name; /still/another path/bigfile
The first format is the one that Ca
Hi Friends,
I have a script like this
Code:
cat script
#!/bin/bash
#Name: name
#Task: name
#$ -e /path/to/error/logfile/err.log
#$ -o /path/to/output/logfile/out.log
I have a list of commands like this
Code:
cat commands
cat 1.txt > 2.txt
cat 23.bed > 789.alm
zcat 1.gz > 1.txt
My request is that
Now for each line in my command file, I would like to make a script file.