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
VSTP(1) 						       BrlNet User's Manual							   VSTP(1)

NAME
vstpg, vstpp - VisioBraille file transferring SYNOPSIS
vstpg [-ifbnd] [-s socketport] [-k keyname] [-o configname] file ... DESCRIPTION
vstpg (resp. vstpp) gets (resp. puts) files from (resp. onto) a VisioBraille terminal. For communicating with the terminal, you must launch brltty with the BrlNet driver, and telling BrlNet to use the VisioBraille driver. Before putting on the terminal, file names are truncated to 8 characters without any extension. Before getting from terminal, leading path and trailing extensions are removed, but put back for local filename. COMMAND-LINE OPTIONS -i ask for confirmation of transfer, for each file (on the terminal) -f don't ask for such a confirmation (default) -b if they exists, recursively rename the old files with an added .x suffix, just like logrotate does -n do not keep such backup file (default) -s socketport use socketport as the port number instead of default for connecting to BrlNet -k filename use filename as key path instead of default for reading BrlNet's authentication key -d use current directory rather than the download directory (see vbs_dir below) -o filename also read filename as config file CONFIG FILE
vstpg and vstpp read a configuration file $HOME/.vstprc which contains keywords or equalities, one per line (what follows a # is ignored). You can ask them to also read any other file thanks to the -o option. Here are keywords: backup make -b option the default nobackup make -f option the default and equalities: keyname = filename use this file instead of default, to find BrlNet's authentication key socketport = port use this port number, instead of default, to connect to BrlNet vbs_ext = .ext use .ext as an extension for downloaded files (.vis by default) this is overriden on command line if an extension is provided in the file name vbs_dir = path use path instead of current directory for putting files, except when using the -d option, or if the filename begins with '.' RETURNED VALUE
1 syntax error on command line 2 connection with BrlNet error 3 Unix file error 4 Protocol error 16 interrupted by user SHELL EXPANSIONS
Beware of special chars: * and . are often expanded by your shell, hence vstpp * will probably do what you want, putting every file exist- ing in the current directory onto the terminal, but vstpg * may not do what you want: it will only get every file which already exist in the current directory, skipping those you just created on your terminal ! If you want to get every file which exist in the terminal, you should use vstpg '*' or something similar (please read your shell manual). The same warning applies to other special chars, such as $, ~, &,... which should be protected by surrounding arguments by quotes (') or by using single backslashes () just before them (please read your shell manual). BUGS
The one we could find has been corrected :) AUTHOR
Samuel Thibault <samuel.thibault@ens-lyon.org> and Sebastien Hinderer <sebastien.hinderer@ens-lyon.fr> BrlNet Jul 15, 2002 VSTP(1)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy