Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators Help with Grouping and zipping folders Post 303000161 by paul1234 on Wednesday 5th of July 2017 12:13:05 PM
Old 07-05-2017
Help with Grouping and zipping folders

Code:
  
 Hi can you please help with the below ?
  
 source file:
 Column1,Column2,Column3,Column4
abc,123,dir1/FXX/F19,1
abc,123,dir1/FXX/F20,1
abc,123,dir1/FXX/F23,2
abc,123,dir1/FXX/C25,2
abc,123,dir1/FXX/X25,2
abc,123,dir1/FXX/A23,3
abc,123,dir1/FXX/Z25,3
abc,123,dir1/FXX/Y25,4
 I want to move the folders (F19,F20,F23 etc. from Column 3 which is the folder path ) according to their respective grouping name in Column 4 (1,2,3,4 etc) such that folders marked under the same group move to another folder which will have the same name as that of their 
group name and this folder should then get zipped.
 
for eg: 
 folders F19,F20 should move to another folder "1" (group name) and then zipped as 1.zip
folders F23,C25,X25 should move to another folder "2" (group name) and then zipped as 2.zip
folders A23,Z25,Y25 should move to another folder "3" (group name) and then zipped as 2.zip

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

zipping across platforms

I saw a few posts on this, however, I am getting an error and don't see this particular issue. Not right off anyways.... We moved from digital OS to solaris 9 in Jan. On the old platform, I could gzip my files, ftp them to my win2000 desktop via hummingbird and then unzip them to view. Now,... (8 Replies)
Discussion started by: MizzGail
8 Replies

2. UNIX for Dummies Questions & Answers

Zipping

Hi In unix i want to zip the files in a directory excluding *.dmp, *.log, *.lst, *.out files in that directory. pls let me know what command to use. $zip ........ ? Thanks (1 Reply)
Discussion started by: dreams5617
1 Replies

3. Shell Programming and Scripting

zipping files

Dear Experts, I need a script which will zipped the files older than 2 days. but i dont want to use find . * -mtime 2. Is there is any other method to achive this task. i will ececute the script daily. Regards, (3 Replies)
Discussion started by: shary
3 Replies

4. Shell Programming and Scripting

Help with zipping files

Hi, I have come across a requirement in which I need to zip files. This is fine but the requriement has one conditions like below: One .z file can not have more than 10,000 files Now in the directory I have several files liek below: aaa_file_10_00001.txt aaa_file_10_00002.txt... (6 Replies)
Discussion started by: angshuman
6 Replies

5. Shell Programming and Scripting

Making 99 folders 99 folders deep

I am trying to make a unix shell script that will make 99 folders 99 deep (counting the first level folders). So far i have made it make the first 99 folders and 99 more in all of the folders. The only problem is the only way i have found is copying and pasting part of the script over and over and... (18 Replies)
Discussion started by: YukonAppleGeek
18 Replies

6. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

7. Shell Programming and Scripting

Zipping and moving

Hi, I have got the script which find out the file that was modified 3 days ago now i want that all the files which fall into this category to be get zipped and then send to another directory...plz can u suggest me for that or any commands (18 Replies)
Discussion started by: SARAL SAXENA
18 Replies

8. Shell Programming and Scripting

zipping files then remove the folders

Hi, i am using the below script to zip the files with respect to their timestamp of the files.It is working fine. For example lets take I have two files in this directory /path/folder1 with the timestamp as this month and previous month. When i run this script first time it is creating two... (7 Replies)
Discussion started by: velava
7 Replies

9. Shell Programming and Scripting

Help with grouping and zipping

Hi can you please help with the below ? source file: Column1,Column2,Column3,Column4 abc,123,dir1/FXX/F19,1 abc,123,dir1/FXX/F20,1 abc,123,dir1/FXX/F23,2 abc,123,dir1/FXX/C25,2 abc,123,dir1/FXX/X25,2 abc,123,dir1/FXX/A23,3 abc,123,dir1/FXX/Z25,3 abc,123,dir1/FXX/Y25,4 I want to... (3 Replies)
Discussion started by: paul1234
3 Replies

10. UNIX for Beginners Questions & Answers

Zipping

Good Morning, I'd like to archive an old user's files in the home directory on Solaris 9 Will this work? cd home tar -zcvf jsmitharchive.tar.gz jsmith/ ---------- Post updated at 09:37 AM ---------- Previous update was at 09:33 AM ---------- Also- is the last /necessary (after... (4 Replies)
Discussion started by: Stellaman1977
4 Replies
Graphics::Primitive::Insets(3pm)			User Contributed Perl Documentation			  Graphics::Primitive::Insets(3pm)

NAME
Graphics::Primitive::Insets - Space between things DESCRIPTION
Graphics::Primitive::Insets represents the amount of space that surrounds something. This object can be used to represent either padding or margins (in the CSS sense, one being inside the bounding box, the other being outside) SYNOPSIS
use Graphics::Primitive::Insets; my $insets = Graphics::Primitive::Insets->new({ top => 5, bottom => 5, left => 5, right => 5 }); METHODS
Constructor new Creates a new Graphics::Primitive::Insets. Instance Methods as_array Return these insets as an array in the form of top, right, bottom and left. bottom Set/Get the inset from the bottom. equal_to Determine if these Insets are equal to another. left Set/Get the inset from the left. right Set/Get the inset from the right. top Set/Get the inset from the top. zero Sets all the insets (top, left, bottom, right) to 0. AUTHOR
Cory Watson, "<gphat@cpan.org>" SEE ALSO
perl(1) COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Insets(3pm)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy