Sponsored Content
Full Discussion: Shell script to copy file
Top Forums Shell Programming and Scripting Shell script to copy file Post 302500530 by hainguyen1402 on Tuesday 1st of March 2011 01:29:07 AM
Old 03-01-2011
Sorry all about my unclear question that I gave.
My problem is copy all files file name have character "_1." to "_2." don't care about extension.
For example: I have files:
ads_daily_10_2008_1.MYD
ads_daily_10_2008_1.MYI
ads_daily_10_2008_1.frm
I need script that can copy these files to new files like:
ads_daily_10_2008_2.MYD
ads_daily_10_2008_2.MYI
ads_daily_10_2008_2.frm
Thank in advance.!

HaiNguyen
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell script to search for text in a file and copy file

Compete noob question.... I need a script to search through a directory and find files containing text string abcde1234 for example and then copy that file with that text string to another directory help please :eek: (9 Replies)
Discussion started by: imeadows
9 Replies

2. Shell Programming and Scripting

Help with a shell script to modify one line and copy the next 9 to same file

Hi everyone, the problem is quite simple, yet I can't find an easy solution using awk. I need to search for a string in $3, then if I find this string, copy the line,modify $3, and copy the next 9 lines to the same file. My problem is in the copying of the lines... Finding and modifying... (5 Replies)
Discussion started by: Teroc
5 Replies

3. Shell Programming and Scripting

Shell Script - Copy File at intervals

Hi, I want to copy some files from a Folder say, /usr/X at random intervals to another location. Basically, new files will be dumped at random intervals to location /usr/X and I have to copy those new files to some other location (after copying, I cannot delete those files from source... (2 Replies)
Discussion started by: angshuman_ag
2 Replies

4. Shell Programming and Scripting

Solaris KSH shell script to copy all lines from one file to another

Hello, more of a windows wscript guy. However I took a new position that requires me to support some solaris servers. So... issue is that I need to copy all lines from a file to a temporary file and then copy them back into the original file starting at line 1. Reason I need to do this is... (5 Replies)
Discussion started by: ZigZaggin
5 Replies

5. Shell Programming and Scripting

Shell script for searching a record,copy to a file and then delete it

Hi, I have a requirement in hand: I have a file with millions of records say file 1.I have another file, say file 2 which has 2000 records in it. The requirement is to read file2 , and remove the read record from file 1 and move i to a seperate file, file 3. For eg: Read file 2, get the... (5 Replies)
Discussion started by: kumara2010
5 Replies

6. Shell Programming and Scripting

Shell script to copy a log file if it exceeds 5000000 bytes

Hi, on unix box, under /local/home/userid/logs folder, apps generated the following files sw_warn.log sw_error.log eaijava.log if there any application specific errors, the above file will keep growing. if the file exceed 5000000 bytes, I would like to have a shell script which do... (6 Replies)
Discussion started by: lookinginfo
6 Replies

7. Shell Programming and Scripting

Shell Script Problems, Lose formatting when copy pasting from formatted file.

Hello, I'm having trouble with formatting some text via the terminal. I can get it perfectly formatted, but when I try and copy paste the text from the output file it loses it's formatting. Very frustrating! Basically I have 7 files (data data2 data3 data4 data5 data6 data7) containing a... (13 Replies)
Discussion started by: facetoe
13 Replies

8. Shell Programming and Scripting

Shell script to copy particular file from directories recursively

I have directory path in which there are several sub directories. In all these sub dir there will be one env.cnf file. I want to copy this env.cnf file from each sub dir's and place them in destination path by creating same filename as sub dir_env.cnf. After copying env.cnf files from source... (4 Replies)
Discussion started by: Optimus81
4 Replies

9. UNIX for Dummies Questions & Answers

Download .xls file from mail and copy to another path using shell script

Hi I have a mail attachment coming from a mail id and evreytime with the same name in .xls format.I have to download the .xls file into a location and convert it itno .csv format and copy the .csv file to another location. (1 Reply)
Discussion started by: bikky6
1 Replies

10. Shell Programming and Scripting

Shell script which will check the target file and folder exists and copy it

Hi All, I am a beginner in this and trying to write a shell script in linux which will : 1. Ask for a file name and check if its exists. 2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists. 3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies
FRM.MAILUTILS(1)						   User Commands						  FRM.MAILUTILS(1)

NAME
frm.mailutils - display From: lines. SYNOPSIS
frm.mailutils [OPTION...] [URL ...] DESCRIPTION
GNU frm -- display From: lines. -d, --debug enable debugging output -f, --field=NAME header field to display -l, --[no-]to include the To: information -n, --[no-]number display message numbers -Q, --Quiet do not display headers -q, --query print a message if the mailbox contains some unread mail -S, --[no-]summary print a summary of messages -s, --status=STATUS select messages with the specific attribute: new, unread, old (same as unread) or read (or any unambiguous abbreviation of these) -t, --[no-]align tidy mode: align subject lines Global debugging settings --debug-level=LEVEL set Mailutils debugging level --[no-]debug-line-info show source info with debugging messages Configuration handling --config-file=FILE load this configuration file; implies --no-config --config-lint check configuration file syntax and exit --config-verbose verbosely log parsing of the configuration files --no-config do not load site and user configuration files --no-site-config do not load site-wide configuration file --no-user-config do not load user configuration file --set=PARAM=VALUE set configuration parameter Informational options --config-help show configuration file summary --show-config-options show compilation options -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. REPORTING BUGS
Report bugs to <bug-mailutils@gnu.org>. GNU Mailutils home page: <http://mailutils.org> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The complete GNU mailutils documentation is maintained as a Texinfo manual. If the mailutils-doc package is installed, the command info mailutils should give you access to the complete manual. You can also find this manual online in the GNU mailutils webpage: https://www.gnu.org/software/mailutils/manual/index.html. Please note this manpage was automatically generated by the Debian mailutils packagers. Do not file bugs for its content to the GNU Mailu- tils upstream authors. FSF
November 2017 FRM.MAILUTILS(1)
All times are GMT -4. The time now is 03:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy