Sponsored Content
Top Forums Shell Programming and Scripting Zipping files by numeric name range Post 302844216 by steve matthews on Saturday 17th of August 2013 09:38:15 AM
Old 08-17-2013
Quote:
Originally Posted by enwood
Much appreciated, Steve!

I only had to add my file extension:

Code:
mkdir destination

for x in /yourfolder/{5000..1000000}.pdf;
do cp  $x destination;
done;

zip destination;

Thanks for the leg up.

Tim
HI Tim,

Yes, I forgot the file extension ...

The 1000000 simply represents an upper maximum value.

Does the script actually work ?

Steven M
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

numeric range comparisons

I have two files.And a sort of matrix analysis. Both files have a string followed by two numbers: File 1: A 2 7 B 3 11 C 5 10 ...... File 2: X 1 10 Y 3 5 Z 5 9 What I'd like to do is for each set of numbers in the second file indicate if the first or second number (or both) in... (7 Replies)
Discussion started by: dcfargo
7 Replies

2. UNIX for Dummies Questions & Answers

Zipping files?

how would i zip a file? what does zip mean? (4 Replies)
Discussion started by: trob
4 Replies

3. Shell Programming and Scripting

zipping files

Hi, Is there any difference if files are individually zipped and archived in a directory or if files are moved into archiving directory and zipping that directory. (3 Replies)
Discussion started by: swathich
3 Replies

4. Shell Programming and Scripting

awk to match a numeric range specified by two columns

Hi Everyone, Here's a snippet of my data: File 1 = testRef2: A1BG - 13208 13284 AAA1 - 34758475 34873943 AAAS - 53701240 53715412File 2 = 42MLN.3.bedS2: 13208 13208 13360 13363 13484 13518 13518My awk script: awk 'NR == FNR{a=$1;next} {$1>=a}{$1<=a}{print... (5 Replies)
Discussion started by: heecha
5 Replies

5. 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

6. Shell Programming and Scripting

Count occurences of a numeric string falling in a range

Dear all, I have numerous dat files (1.dat, 2.dat...) containing 500 numeric values each. I would like to count them, based on their range and obtain a histogram or a counter. INPUT: 1.dat 1.3 2.16 0.34 ...... 2.dat 1.54 0.94 3.13 ..... ... (3 Replies)
Discussion started by: chen.xiao.po
3 Replies

7. Programming

Perl : Numeric Range Pattern Matching

hi Experts just wondering if you can help me check a number between a specific range if i have an ip address , how can i say the valid number for ip between 1 to 254 something like this if ($ip ) =~ /.../ { } what the pattern i need to type thanks (3 Replies)
Discussion started by: doubando
3 Replies

8. Shell Programming and Scripting

Awk numeric range match only one digit?

Hello, I have a text file with lines that look like this: 1974 12 27 -0.72743 -1.0169 2 1.25029 1974 12 28 -0.4958 -0.72926 2 0.881839 1974 12 29 -0.26331 -0.53426 2 0.595623 1974 12 30 7.71432E-02 -0.71887 3 0.723001 1974 12 31 0.187789 -1.07114 3 1.08748 1975 1 1 0.349933 -1.02217... (2 Replies)
Discussion started by: meridionaljet
2 Replies

9. Shell Programming and Scripting

Generate Regex numeric range with specific sub-ranges

hi all, Say i have a range like 0 - 1000 and i need to split into diffrent files the lines which are within a specific fixed sub-range. I can achieve this manually but is not scalable if the range increase. E.g cat file1.txt Response time 2 ms Response time 15 ms Response time 101... (12 Replies)
Discussion started by: varu0612
12 Replies

10. UNIX for Beginners Questions & Answers

Find and removing the old files and zipping the files using shell script

Hi, I am trying to removing the old files which were older than 10 days and same g zipping the files using the shell script. script was return as follows. find /jboss7_homes/JBOSS7/SKYLIV??/SKYLIV??_CRM/jboss-eap-7.0/standalone/log -mtime +10 -type f | xargs rm -f find /cer_skyliv??/log... (6 Replies)
Discussion started by: venkat918
6 Replies
xcb_send_event(3)						   XCB Requests 						 xcb_send_event(3)

NAME
xcb_send_event - send an event SYNOPSIS
#include <xcb/xproto.h> Request function xcb_void_cookie_t xcb_send_event(xcb_connection_t *conn, uint8_t propagate, xcb_window_t destination, uint32_t event_mask, const char *event); REQUEST ARGUMENTS
conn The XCB connection to X11. propagate If propagate is true and no clients have selected any event on destination, the destination is replaced with the closest ancestor of destination for which some client has selected a type in event_mask and for which no intervening window has that type in its do-not-propagate-mask. If no such window exists or if the window is an ancestor of the focus window and InputFocus was originally specified as the destination, the event is not sent to any clients. Otherwise, the event is reported to every client selecting on the final destination any of the types specified in event_mask. destination The window to send this event to. Every client which selects any event within event_mask on destination will get the event. The special value XCB_SEND_EVENT_DEST_POINTER_WINDOW refers to the window that contains the mouse pointer. The special value XCB_SEND_EVENT_DEST_ITEM_FOCUS refers to the window which has the keyboard focus. event_mask Event_mask for determining which clients should receive the specified event. See destination and propagate. event The event to send to the specified destination. DESCRIPTION
Identifies the destination window, determines which clients should receive the specified event and ignores any active grabs. The event must be one of the core events or an event defined by an extension, so that the X server can correctly byte-swap the contents as necessary. The contents of event are otherwise unaltered and unchecked except for the send_event field which is forced to 'true'. RETURN VALUE
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop. If you want to handle errors directly with xcb_request_check instead, use xcb_send_event_checked. See xcb-requests(3) for details. ERRORS
xcb_window_error_t The specified destination window does not exist. xcb_value_error_t The given event is neither a core event nor an event defined by an extension. EXAMPLE
/* * Tell the given window that it was configured to a size of 800x600 pixels. * */ void my_example(xcb_connection_t *conn, xcb_window_t window) { /* Every X11 event is 32 bytes long. Therefore, XCB will copy 32 bytes. * In order to properly initialize these bytes, we allocate 32 bytes even * though we only need less for an xcb_configure_notify_event_t */ xcb_configure_notify_event_t *event = calloc(32, 1); event->event = window; event->window = window; event->response_type = XCB_CONFIGURE_NOTIFY; event->x = 0; event->y = 0; event->width = 800; event->height = 600; event->border_width = 0; event->above_sibling = XCB_NONE; event->override_redirect = false; xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char*)event); xcb_flush(conn); free(event); } SEE ALSO
xcb-requests(3), xcb-examples(3), xcb_configure_notify_event_t(3) AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_send_event(3)
All times are GMT -4. The time now is 11:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy