Sponsored Content
Top Forums Shell Programming and Scripting Loop through files in a directory Post 76023 by alisevA3 on Friday 24th of June 2005 05:30:16 AM
Old 06-24-2005
works well. thank you

Alice
 

10 More Discussions You Might Find Interesting

1. AIX

loop through the directory for files and sort by date and process the first file

hello i have a requirement where i have a direcotry in which i get files in the format STOCKS.20080114.dat STOCKS.20080115.dat STOCKS.20080117.dat STOCKS.20080118.dat i need to loop through the directory and sort by create date descending order and i need to process the first file. ... (1 Reply)
Discussion started by: dsdev_123
1 Replies

2. Shell Programming and Scripting

Loop certain code to all files within directory

Hi all, Can somebody help me with this problem pls. I need to extract one specific line from each files in a folder and put the all lines extracted in a unique output file in the following format. line extracted, respective name of file, date of file. I´m, trying the part to extract... (3 Replies)
Discussion started by: cgkmal
3 Replies

3. Shell Programming and Scripting

loop through files in directory

hi all i have some files present in a directory i want to loop through all the files in the directory each time i loop i should change the in_file parameter in the control file and load it into a table using sql loader there is only one table where i have to load alll the files ... (3 Replies)
Discussion started by: rajesh_tns
3 Replies

4. Shell Programming and Scripting

Find the latest directory and loop through the files and pick the error messages

Hi, I am new to unix and shell scripting,can anybody help me in sctipting a requirement. my requirement is to get the latest directory the name of the directory will be like CSB.monthdate_time stamp like CSB.Sep29_11:16 and CSB.Oct01_16:21. i need to pick the latest directory. in the... (15 Replies)
Discussion started by: sudhir_83k
15 Replies

5. UNIX Desktop Questions & Answers

Copy all files in 1 directory to another usinge for-in loop

I was looking to get some help with copying files in one directory to another using a for-in loop. My script file is called copyfile and here is what I have: for file in $(ls -a $1) do cp $file ~/dir-2 done When I run copyfile dir-1 this is what I get cp: omitting directory `.'... (1 Reply)
Discussion started by: Trinimini
1 Replies

6. UNIX for Dummies Questions & Answers

[Solved] Writing a loop to changing the names of files in a directory

Hi, I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

7. Shell Programming and Scripting

Loop through files in a directory

Hello How do I loop through files in a specific directory ? This script is not working! #! /bin/bash FILES=/usr/desktop/input/* For f in $FILES; do awk '-v A="$a" -v B="$b" {$6=($1-64)/2 ;$7=((10^($6/10))/A)^(1/B) ; print}' OFS="\t" $f > /root/Desktop/output/$f.txt; done ... (7 Replies)
Discussion started by: ali.seifaddini
7 Replies

8. Shell Programming and Scripting

Loop through files in directory

I am trying to loop through files in a directory, and sort each file. No matter what changes I make to the code, I get the following errors: 'aunch.sh: line 4: syntax error near unexpected token `do 'aunch.sh: line 4: `for f in ${FILES}/*; do #!/bin/bash FILES=$(pwd) for f in ${FILES}/*;... (1 Reply)
Discussion started by: ldorsey
1 Replies

9. Shell Programming and Scripting

Loop through files in directory

I am trying to loop through files in a directory, and sort each file. No matter what changes I make to the code, I get the following errors: 'aunch.sh: line 4: syntax error near unexpected token `do 'aunch.sh: line 4: `for f in ${FILES}/*; do #!/bin/bash FILES=$(pwd) for f in ${FILES}/*;... (6 Replies)
Discussion started by: ldorsey
6 Replies

10. Shell Programming and Scripting

How to exclude some files from the loop on the directory?

I have one question. On the directory I have many files start with DB.DAILYxxxxxxx.YYYYMMDD.HHMMSS and I have several files with other format, like LET.20170310 daily.20170310 tba.20170310 How can I exclude from my loop DB.DAILY files? I tried ls *20170310* | while read... (4 Replies)
Discussion started by: digioleg54
4 Replies
App::Alice(3pm) 					User Contributed Perl Documentation					   App::Alice(3pm)

NAME
App::Alice - an Altogether Lovely Internet Chatting Experience SYNPOSIS
arthur:~ leedo$ alice Location: http://localhost:8080/ DESCRIPTION
Alice is an IRC client that is viewed in the web browser. Alice runs in the background maintaining connections and collecting messages. When a browser connects, it will display the 100 most recent messages for each channel, and update with any new messages as they arrive. Alice also logs messages to an SQLite database. These logs are searchable through the web interface. USAGE
Installation will add a new `alice` command to start the alice server. When the command is run it will start the daemon and print the URL to load in your browser. COMMANDLINE OPTIONS -d --debug Print out additional debug information. Useful for development or finding out if something is wrong. -p --port This will change the port that the HTTP server listens on. The default port is 8080. -a --address This will change the IP address that the HTTP server listens on. The default address is 127.0.0.1. That means alice only accepts local connections by default. If you want to connect to alice remotely you should change it to the IP you want to listen on, or 0.0.0.0 to listen on all addresses. CONFIGURATION
Most of alice can be configured through the web interface. There are two windows that can be used to alter the configuration, Connections and Preferences. To bring up either of these windows click the gear icon in the bottom right hand corner of the page. This should bring up the new window. Some browsers (specifically Chrome) will block this popup by default. If it doesn't appear make sure that you allow popups! CONNECTION WINDOW The connection window is used to add or remove servers. It should be familiar if you have ever used an IRC client (and I assume you have.) The only difference of note is the "Avatar" field. In reality, this field just sets the realname. Alice abuses this field to get avatars for users. If a user has an image URL or an email address as their realname, alice will display the image next too their messages. This feature can be disabled in the Preferences window. PREFERENCES WINDOW The Preferences window can be used to set configuration options that are not connection specific. You can toggle the use of avatars, timestamps, and notifications. You can also edit a list of highlightable terms. HTTP AUTHENTICATION Some configuration options do not have a UI yet. The most notable of these options is HTTP authentication. If you would like to use HTTP authentication, you will have to edit your configuration file by hand. You can find this file at ~/.alice/config. The config is simply a perl hash. So, if you are familiar with perl it should not be too intimidating. If you do not know perl, sorry! :) You will need to add "user" and "pass" values to the "auth" hash. The resulting section of configuration might look like this: 'auth' => { 'user' => 'lee', 'pass' => 'mypassword', }, COMMANDS
/j[oin] [-network] $channel Takes a channel name as an argument, and an optional network flag. If no network flag is provided, it will use the network of the current tab. /close Closes the current tab. If used in a channel it will also part the channel. /wc and /part are aliases for /close /clear This will clear the current tab's messages from your browser. It will also clear the tab's message buffer so when you refresh your browser the messages won't re-appear. /msg [-network] <nick> [<msg>] Takes a nick as an argument and an optional network flag. If no network flag is provided, it will use the network of the current tab. A third argument may be used for the message text. If no message text is provided, a blank tab will be opened. /query is an alias for /msg /whois [-force] <nick> Takes a nick as an argument and an optional force flag. This will print some information about the supplied user. If the force flag is provided, the information will be refreshed from the server. /quote <command> Sends a string as a raw message to the server. /raw is an alias for /quote /t[opic] [<topic>] Takes an optional topic string. This will display the topic for the current tab. If a string is supplied, it will attempt to update the channel's topic. Only works in a channel. /n[ames] [-avatars] This will print a table of all of the nicks in the current tab. An optional avatars flag can be provided to include avatars. /me <action> Sends a string as an action to the channel. e.g. * lee hits clint with a large trout /w[indow] <number> Focus the provided tab number. Also accepts "next" or "prev". The space after the w can be ommited (e.g. /w4 to focus window 4.) /connect <network> Connect to a network. The network must be the name of a server from the Connections window. If you are already connected to the network it will do nothing. /disconnect <network> Disconnect from a network. The network must be the name of a server from the Connections window. This command will also stop any reconnect timers for that network. /ignore <nick> Ignore any nick that matches the one provided. This applies across all networks. /ignores List all active ignored nicks. /unignore <nick> Unignore a nick. NOTIFICATIONS
If you get a message with your nick in the body while no browsers are connected, a notification will be sent using either Growl (if running on OS X) or libnotify (on Linux.) You can add additional patterns to highlight in the Preferences window. If you are using Fluid.app (a SSB for OS X) or Chrome you can also get notifications when the window is unfocused. MOBILE INTERFACE
Alice has an iPhone style sheet, but it may work in other mobile browsers as well. Any help or bug reports would be much appreciated. COPYRIGHT
Copyright 2010 by Lee Aylward <leedo@cpan.org> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2010-08-30 App::Alice(3pm)
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy