Sponsored Content
Top Forums Shell Programming and Scripting 06252007_template.twj to 06252007_abc.twj Post 302447343 by axed on Sunday 22nd of August 2010 06:18:52 PM
Old 08-22-2010
06252007_template.twj to 06252007_abc.twj

Hi,

I am working in the SH shell. I have a bunch of files in a directory dir/
06252007_template.twj
06262007_template.twj
06272007_template.twj
...

Now I want to duplicate these files to
06252007_abc.twj
06262007_abc.twj
06272007_abc.twj
...

I was wondering if there was a simple way like a one liner to do this task.

I have another thing to do after this. In each of the xxxx2007_template.twj files there is a string XXXXX|YYYYY, which I want to replace with the string 70|AAPL in the newly created xxxx2007_abc files.

I was wondering if there a smart way to do this.

Thanks in advance.
 
BBACKUPD-CONFIG(8)						    Box Backup							BBACKUPD-CONFIG(8)

NAME
bbackupd-config - Box Backup client daemon configuration file generator SYNOPSIS
bbackupd-config config-dir backup-mode account-num server-hostname working-dir backup-dir [backup-dir ...] DESCRIPTION
The bbackupd-config script creates configuration files and client certificates. It takes at least six parameters: config-dir Configuration directory. Usually /etc/box. backup-mode Either lazy or snapshot. account-num The client account number. This is set by the bbstored administrator. server-hostname The hostname or IP address of the bbstored server. working-dir A directory to keep temporary state files. This is usually something like /var/bbackupd. This can be changed in bbackupd.conf later on if required. backup-dir A space-separated list of directories to be backed up. Note that this does not traverse mount points. FILES
/etc/box/bbackupd.conf /etc/box/bbackupd/NotifySysAdmin.sh SEE ALSO
bbackupd.conf(5), bbackupd(8), bbackupctl(8) AUTHORS
Ben Summers Per Thomsen James O'Gorman Box Backup 0.11 10/28/2011 BBACKUPD-CONFIG(8)
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy