Sponsored Content
Top Forums Shell Programming and Scripting filename in current directory Post 302114397 by calgone337 on Sunday 15th of April 2007 12:21:11 PM
Old 04-15-2007
filename in current directory

I want to perform a task on all the files in the current directory but I'd like to loop through them one at a time. How do I tell it to give me the first filename?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Append current date to filename

In C Shell programming I haven't successfully been able to append the date in the format mmddyyyy to a filename. I've tried the following: I can print out the date in the correct format: date +%x | sed ‘s/\///g I can create a variable with the filename: set newfile=changedfiles I can... (3 Replies)
Discussion started by: gigigi
3 Replies

2. UNIX for Advanced & Expert Users

cannot determine current directory

Hi, when I execute some simple commands on my solaris system, I am getting the following warning message: Could anybody tell me what could be the reason Ex:- If I give the command, which ls Warning: cannot determine current directory ... (15 Replies)
Discussion started by: axes
15 Replies

3. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

4. Shell Programming and Scripting

how to append current date to filename.tgz in perl

i would like to know how to append current date in a filename with .tgz extension. #!/usr/bin/perl my $date = `date + %Y%m%d`; system("sudo mv /tmp/nyucs01_config_backup.tgz /misc/nyucs01_config_backup_$date.tgz"); im getting this error message: sh: line 1: .tgz: command not found (7 Replies)
Discussion started by: linuxgeek
7 Replies

5. Shell Programming and Scripting

tarball of current directory

I wanna make a backup tarball. I wanna write a script that makes tarball of the current directory. There are lots of files so I cant type all files, I wanna make the tarball by excluding few files. Like there 1000 files in a directory I wanna create a tarball containing 98 files of that... (1 Reply)
Discussion started by: nishrestha
1 Replies

6. Shell Programming and Scripting

Move txt file to with current date appended to filename

I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>" So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (1 Reply)
Discussion started by: johannd
1 Replies

7. UNIX for Dummies Questions & Answers

Move txt file to with current date appended to filename

I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>" So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (7 Replies)
Discussion started by: johannd
7 Replies

8. UNIX for Advanced & Expert Users

current directory in awk

Hello, I want to use the string with the current directory in my awk command. I tried: 'pwd=system("pwd")' but it doesn't work. can please help somebody? (2 Replies)
Discussion started by: daWonderer
2 Replies

9. UNIX for Dummies Questions & Answers

Current working directory

Hi all, How do I print the name of my current working directory only to screen? Not pwd! For example, if I was in /home/work I am looking for 'work' only (4 Replies)
Discussion started by: jimjam
4 Replies

10. UNIX for Dummies Questions & Answers

How to get the current directory Path?

How to get the current directory Path in your prompt? i am getting a $ mark only in my prompt? Please help me with this (3 Replies)
Discussion started by: Abhishek0683
3 Replies
GEARMAN_TASK_DATA(3)						     Gearmand						      GEARMAN_TASK_DATA(3)

NAME
gearman_task_data - Gearmand Documentation, http://gearman.info/ SYNOPSIS
#include <libgearman/gearman.h> gearman_task_st void gearman_task_free(gearman_task_st *task) void *gearman_task_context(const gearman_task_st *task) void gearman_task_set_context(gearman_task_st *task, void *context) const char *gearman_task_function_name(const gearman_task_st *task) const char *gearman_task_unique(const gearman_task_st *task) const char *gearman_task_job_handle(const gearman_task_st *task) bool gearman_task_is_known(const gearman_task_st *task) bool gearman_task_is_running(const gearman_task_st *task) uint32_t gearman_task_numerator(const gearman_task_st *task) uint32_t gearman_task_denominator(const gearman_task_st *task) void gearman_task_give_workload(gearman_task_st *task, const void *workload, size_t workload_size) size_t gearman_task_send_workload(gearman_task_st *task, const void *workload, size_t workload_size, gearman_return_t *ret_ptr) const void *gearman_task_data(const gearman_task_st *task) size_t gearman_task_data_size(const gearman_task_st *task) void *gearman_task_take_data(gearman_task_st *task, size_t *data_size) size_t gearman_task_recv_data(gearman_task_st *task, void *data, size_t data_size, gearman_return_t *ret_ptr) const char *gearman_task_error(const gearman_task_st *task) New in version 0.21. gearman_return_t gearman_task_return(const gearman_task_st *task) New in version 0.21. Link with -lgearman DESCRIPTION
A gearman_task_st represents a task. Work that is sent by a client to a gearman server is seen as a task (a worker recieves a task in the form of a job. Tasks, i.e. gearman_task_st are created by calling either gearman_execute(), gearman_client_add_task(), or gearman_client_add_task_back- ground(). gearman_client_add_task_status() can also create gearman_task_st, these tasks will be used to monitor a previously created gearman_task_st. gearman_task_free() is used to free a task. This only needs to be done if a task was created with a preallocated structure or if you want to clean up the memory of a specific task. gearman_task_set_context() sets the given context of the gearman_task_st. The context can be used to pass information to a gearman_task_st. gearman_task_context() returns the context that was used in the creation of the gearman_task_st (or that was set with gearman_task_set_context(). gearman_task_data() returns the current data that has been returned to the task. gearman_task_data_size() will give you the size of the value. gearman_task_take_data() is the same as gearman_task_data() but the value that is returned must be freed by the client (free(3)). gearman_task_recv_data() can be used with pre-allocated buffers. gearman_task_is_known(), gearman_task_is_running(), gearman_task_numerator(), and gearman_task_denominator(), return values related to the last status update that was made to the gearman_task_st. They do not cause the gearman_task_st to update itself. gearman_task_error() return the last error message that the gearman_task_st encountered. gearman_task_return() return the last gear- man_return_t stored. A value of GEARMAN_UNKNOWN_STATE means that the task has not been submitted to server yet, or that no function was available if the job has been submitted. RETURN VALUE
Various. Values that are returned by gearman_task_take_data() must have free(3) called on them. HOME
To find out more information please check: http://gearman.info/ SEE ALSO
gearmand(8) libgearman(3) AUTHOR
Data Differential http://www.datadifferential.com/ COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/ 0.33 May 04, 2012 GEARMAN_TASK_DATA(3)
All times are GMT -4. The time now is 12:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy