Sponsored Content
Top Forums Shell Programming and Scripting Need help in sorting the file and copying Post 302569605 by ahamed101 on Tuesday 1st of November 2011 02:39:42 AM
Old 11-01-2011
When you say the files are getting created monthly basis, does it mean that each file created every month? or all of them created at once one for each month?

--ahamed
This User Gave Thanks to ahamed101 For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

copying a file

hello, i have to copy a file from one directory to another directory in linux. how to do this using a c function? kindly ans to my query. thanks (2 Replies)
Discussion started by: svh
2 Replies

2. Shell Programming and Scripting

copying the csv file into different worksheets of xls file

Hi, I have a script which will generate three csv files. i want to copy the contents of these csv files into a .XLS file but in different worksheets. Can a this be done in the same script? :confused: Can Perl come to my help in coping the csv files into different worksheets of .XLS file ?... (0 Replies)
Discussion started by: nimish
0 Replies

3. Filesystems, Disks and Memory

Strange difference in file size when copying LARGE file..

Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB. The weird fact is that the BACKUP folder was 2 GB more than the original one! ... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

4. UNIX for Dummies Questions & Answers

Copying one file into another

I have two files, lets say file1.pun and file2.pun Now i need to copy the first 10 lines of file1.pun and paste them on the head of file2.pun without deleting the contents of file2.pun. I have to do this from command line only. Can u plz guide me in this regards (4 Replies)
Discussion started by: jasjot31
4 Replies

5. Shell Programming and Scripting

Copying only the file name

Hi I just want to copy the file name from the input file. Below is the code I have used but the answer comes with quotation . $ cat test.sh file_name=\'$1\' echo $file_name $ sh test.sh grants.dat 'grants.dat' How do I remove the quotation Thanks (2 Replies)
Discussion started by: Krishnaramjis
2 Replies

6. Shell Programming and Scripting

Finding & Moving Oldest File by Parsing/Sorting Date Info in File Names

I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves. Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies

7. Shell Programming and Scripting

sed command for copying the contents of other file replacing it another file on specifc pattern

We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>" FILE1.XML 1. <itemList> 2. <item type="Manufactured"> 3. <resourceCode>431048</resourceCode> 4. ... (0 Replies)
Discussion started by: balrajg
0 Replies

8. UNIX for Dummies Questions & Answers

Help with searching for a file in a directory and copying the contents of that file in a new file

Hi guys, I am a newbie here :wall: I need a script that can search for a file in a directory and copy the contents of that file in a new file. Please help me. :confused: Thanks in advance~ (6 Replies)
Discussion started by: zel2zel
6 Replies

9. UNIX for Dummies Questions & Answers

Sorting data in file based on field in another file

Hi, I have two files, one of which I would like to sort based on the order of the data in the second. I would like to do this using a simple unix statement. My two files as follows: File 1: 12345 1 2 2 2 0 0 12349 0 0 2 2 1 2 12350 1 2 1 2 2 2 . . . File2: 12350... (3 Replies)
Discussion started by: kasan0
3 Replies

10. Shell Programming and Scripting

Copying a file to multiple other files using a text file as input

Hello, I have a file called COMPLIST as follows that contains 4 digit numbers.0002 0003 0010 0013 0015 0016 0022 0023 0024 0025 0027 0030 0031 0032 0033 0035 0038 0041 (3 Replies)
Discussion started by: sph90457
3 Replies
lifcp(1)						      General Commands Manual							  lifcp(1)

NAME
lifcp - copy to or from LIF files SYNOPSIS
xxx] xxx] xxx] xxx] file1 file2 xxx] xxx] xxx] xxx] [file1 file2 ...] directory DESCRIPTION
copies a LIF file to an HP-UX file, an HP-UX file to a LIF file, or a LIF file to another LIF file. It also copies a list of (HP-UX/LIF) files to a (LIF/HP-UX) directory. The last name on the argument list is the destination file or directory. Options The space between option and argument is optional. Used only when copying files to a LIF volume. This option forces the file type of the LIF directory entry to be set to the argument given. The argument can be decimal, octal or hex, using standard C notation. Used only when copying files to a LIF volume. This option will set the "last volume flag" to xxx (0 or 1). The default "last volume flag" is Used only when copying files to a LIF volume. This option sets the "volume number" to xxx. The default "volume number" is one. This option forces a ASCII mode of copying regardless of the file type. When copying in ASCII mode from HP-UX to LIF the default file type is BINARY (1). (For details on available modes of copying refer to lif(4)). This option has no effect when copying from LIF to LIF. This option forces a BINARY mode of copying regardless of the file type. When copying in BINARY mode from HP-UX to LIF the default file type is BINARY (-2). (For details on available modes of copying refer to lif(4)). This option has no effect when copying from LIF to LIF. Used only when copying files to a LIF volume. This option sets the "implementation" field of the LIF directory entry to the argument given. The argument value can be decimal, octal or hex, using standard C notation. The "implementation" field can only be set for file types -2001 to -100000 (octal). The "implementation" field is set to zero for all interchange file types and for file types -2 to -200 (octal). Note that the "implementation" value controls the attributes of the LIF file with regard to protection and record sizes. or can be used to determine the "implementation" value of a file. Forces RAW mode copying regardless of file type. When copying in RAW mode from HP-UX to LIF the default file type is BIN (-23951). option overrides the default file type. (various modes of copying are explained in lif(4).) The option has no effect in LIF to LIF copy operations. causes HP-UX file names to be translated to a name acceptable by a LIF utility; that is, all lowercase letters are converted to uppercase and all other characters except numerics are changed to an underscore If the HP-UX file name starts with a nonletter, the file name is preceded by the capital letter Thus, for example, if two files named colon and semicolon were copied, both of them would be translated to File names are truncated to a maximum of 10 characters. When copying a LIF file to an HP-UX or LIF file, has no effect. Omitting causes an error to be generated if an improper name is used. The default copying modes when copying from LIF to HP-UX are summarized in the following table: | File Type | Default Copying Mode ----------+---------------------- ASCII | ASCII BINARY | BINARY BIN | RAW other | RAW When copying from HP-UX to LIF, the default copying mode is ASCII and an ASCII file is created. When copying from LIF to LIF, if no options are specified, then all the LIF directory fields and file contents are duplicated from source to destination. A LIF file name is recognized by the embedded colon delimiter (see lif(4) for LIF file naming conventions). A LIF directory is recognized by a trailing colon. If an HP-UX file name containing a colon is used, the colon must be escaped with two backslash characters (the shell removes one of them). The file name (dash) is interpreted to mean standard input or standard output, depending on its position in the argument list. This is particularly useful if the data requires nonstandard translation. When copying from standard input, if no other name can be found, the name "STDIN" is used. LIF file naming conventions are known only to the LIF utilities. Since file name expansion is done by the shell, this mechanism cannot be used for expanding LIF file names. Do not mount the special file while using DIAGNOSTICS
returns exit code 0 if the file is copied successfully. Otherwise it prints a diagnostic and returns nonzero. EXAMPLES
Copy HP-UX file to LIF file on LIF volume which is actually an HP-UX file initialized to be a LIF volume: Copy all the HP-UX files in the current directory to the LIF volume which is present in the parent directory. File names are translated to appropriate LIF file names. Copy all the HP-UX object files in the current directory to the LIF volume lifvol. Copying mode is RAW and LIF file types are set to -5555. Copy all the object files in the current directory to the LIF volume Copying mode is BINARY and LIF BINARY files are created. Copy a BDAT file, without a password, from a BASIC WorkStation to an HP-UX LIF volume Note that controls protection and record size attributes. The file type for a BDAT file is -5791 (or 0xffffe961) and its record size is 256 bytes per record. Copy all files in the current directory to the LIF volume in the directory. Copying mode is RAW and LIF file types are set to BIN. Copy file to LIF file in Copy files and to LIF files and within Copy LIF file within to file within current directory. Copy standard input to LIF file on LIF volume Copy LIF file in to LIF file on Copy the output of pr to the LIF file Copy the output of pr to the LIF volume LIF file is created since no file names are specified. Copy LIF file in to standard output. Copy all files in current directory to LIF files of the same name on LIF volume (may cause errors if file names in the current directory do not obey LIF naming conventions!). DEPENDENCIES
Series 700/800 The following option is also supported: forces each file copied in to begin on an nnn x 1024-byte boundary from the beginning of the volume. This is useful when files are used for Series 700/800 boot media. This option has no effect when copying from a LIF volume. AUTHOR
was developed by the Hewlett-Packard Company. SEE ALSO
lifinit(1), lifls(1), lifrename(1), lifrm(1), lif(4). lifcp(1)
All times are GMT -4. The time now is 03:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy