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
How would I copy a batch of files into the same directory with an appended filename via SSH Bash Script?
For example.
/path/files/file /path/files/file-20120105
The trick is for it to be a one liner so I don't have to do any fancy for loop or some other mechanism to pass it via ssh.
I have directory path in which there are several sub directories. In all these sub dir there will be one env.cnf file.
I got a text file containing a list of folder and file names, then i have a file system containing these items along with other files and folders. The script I'm writing scan in the file and folder names from the text file, then start searching the file system for these.
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,
My requirement is as follows:
A file (say abc) will be having list of the .txt file names.
I have a list of 150 computers on my Windows Active Directory network that I am trying to copy a files to.
I wonder if someone might have a script that would, copy the files or shortcut to the computers by looking for the PC names in a text file.
I have script for finding files of certain type and compress them to a single tar archive and put in to other place. But now, there is a change in requirement, that I need to find files of certain type, list it and compress each of them to a tar archive and put it to other place.
I am trying to write a script that will copy all file listed in a text file (100s of file names) to a new directory
Assume script will run with main as current working directory and I know how many files/lines will be in List.txt
Im trying to work up a test script using this model
Contents of main
Code:
script.sh
sort < is a folder
List.txt
stuff.pdf
misc.rtf
junk.txt
thing.txt
Contents