The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Comparing file names to text document gman UNIX for Dummies Questions & Answers 1 01-27-2009 07:27 AM
How to deleting some files under subdirectory AdziE Shell Programming and Scripting 4 08-20-2008 09:05 AM
Count files in every subdirectory yorryk Shell Programming and Scripting 3 08-12-2008 06:22 PM
How can I copy files and subdirectory? odogbolu98 UNIX for Dummies Questions & Answers 3 02-15-2002 03:14 PM
subdirectory password sskb UNIX for Dummies Questions & Answers 1 09-24-2001 06:17 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-08-2009
dabombace dabombace is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 2
Question Comparing subdirectory names

I am trying to reformat data from one private directory and reformat it and move it to a public one, but i only want to get directories that have not already been moved to the public directory. Here's what i'm working with

Dir1 contains folders for each named with timestamp

20090320081302
20090327080738
20090410081604
....

Dir2 contains folders named as such

20090320-Topic1
20090327-Topic2
20090410-Topic3

what i want to do is compare the first 8 characters of the folders in dir1 and the first 8 char of folders in dir2 and get only the ones that are not in dir2 and (then go thru all of them and rename them accordingly and upload to dir2 but that's another post i suppose i think i can do that easily)

Any help would be great with comments as i'm new to unix scripting.
  #2 (permalink)  
Old 06-08-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,423
what have you tried till now??
  #3 (permalink)  
Old 06-08-2009
dabombace dabombace is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 2
I was trying to work off the info in this post but not sure what it's doing exactly some comments just on that would be helpful, going to do more research tonight.

Compare File Names in Different Directories...
Closed Thread

Bookmarks

Tags
comparison, directories, file operations in shell, text processing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0