Sponsored Content
Full Discussion: Filename Validation
Top Forums Shell Programming and Scripting Filename Validation Post 302406091 by psr2009 on Monday 22nd of March 2010 02:23:36 AM
Old 03-22-2010
Hi All,
Can you please, help me out for the above scenario. If possible, provide any script for the above scenario.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Filename Validation

I'm going through a script someone wrote and has left the company. I've a file_name -> s31-d173-lookup-20060502111140-sr In the ksh this is a validation : if |)-(*)-(*)---(|-)-sr)) ]]; The validation for the above file_name fails. Any idea why and what is file naming convention the... (2 Replies)
Discussion started by: F-1
2 Replies

2. Shell Programming and Scripting

validation :file <filename>

My user is ftp a CSV file from window. There is possiblity to doing FTP through different mode. This file is then picked by another program, but I want to make sure the FTP file would be always ascii format, bu releasing a commaon File <file name> Can any one provide input , abut how to put a... (2 Replies)
Discussion started by: u263066
2 Replies

3. UNIX for Dummies Questions & Answers

shortcut for tar cvf - [filename] | gzip > [filename].tar.gz

i'd like to have an alias (or something similar) where i can type a command like "archive" and a filename and have it tar and gzip the file, so... $ archive filename results in filename.tar.gz...do i have to write a script to do this? (4 Replies)
Discussion started by: bcamp1973
4 Replies

4. Shell Programming and Scripting

gzcat into awk and then change FILENAME and process new FILENAME

I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies

5. Shell Programming and Scripting

rename multiple filename.45267.txt to >> filename.txt

i have several thousand files and in subdirs that are named file.46634.txt budget.75346.pdf etc i want to remove the number but retain the extension. it is always a 5 digit. thanks. (6 Replies)
Discussion started by: jason7
6 Replies

6. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

7. Shell Programming and Scripting

Name validation

Hi All, I need to write a small piece of code to check the following. name should contain (A-Z), spaces, hyphens & apostrophes I need to generate regular expressions for the same. Please help me out as i am not familiar with regular expressions. (1 Reply)
Discussion started by: lifzgud
1 Replies

8. UNIX for Dummies Questions & Answers

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My Requirement: 1) There are some set of files in a directory like given below OTP_UFSC_20120530000000_acc.csv OTP_UFSC_20120530000000_faf.csv OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

9. Programming

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My code: if then set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\ "pam_account"; for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

10. Shell Programming and Scripting

[Beginner's questions] Filename Validation & Parsing

Hi !! I'm rather new both to the UNIX and scripting worlds, and I'm learning the ropes of scripting. Having said this, please excuse me if you notice certain basic errors. I'm working on a script that implements .jar and .war files for a WAS environment and I need to perform certain... (4 Replies)
Discussion started by: levaldez
4 Replies
WESNOTH(6)							Battle for Wesnoth							WESNOTH(6)

NAME
wesnoth - Battle for Wesnoth, a turn-based fantasy strategy game SYNOPSIS
wesnoth [OPTIONS] [PATH_TO_DATA] DESCRIPTION
Battle for Wesnoth is a turn-based fantasy strategy game. Defeat all enemy leaders using a well-chosen cadre of troops, taking care to manage your resources of gold and villages. All units have their own strengths and weaknesses; to win, deploy your forces to their best advantage while denying your foes the chance to do the same. As units gain experience, they acquire new abilities and become more powerful. Play in your own language and test your skill against a smart computer opponent, or join Wesnoth's large community of online players. Create your own custom units, scenarios or campaigns, and share them with others. OPTIONS
--bpp number sets BitsPerPixel value. Example: --bpp 32 -c, --campaign [<id_campaign>] goes directly to the campaign with id <id_campaign>. A selection menu will appear if no id was specified. Note: When using this switch please ensure that you specify the data directory path as the final argument aswell, otherwise the game will take the cam- paign/scenario id as the data dir. --campaign-difficulty <difficulty> The difficulty of the specified campaign (1 to max). If none specified, the campaign difficulty selection widget will appear. --campaign-scenario <id_scenario> The id of the scenario from the specified campaign. The default is the first scenario. --config-dir name sets the user configuration directory to name under $HOME or "My DocumentsMy Games" for windows. You can also specify an absolute path for the configuration directory outside the $HOME or "My DocumentsMy Games" --config-path prints the path of the user configuration directory and exits. --data-dir <directory> overrides the data directory with the one specified -d, --debug enables additional command mode options in-game (see the wiki page at http://www.wesnoth.org/wiki/CommandMode for more information about command mode). -e, --editor file start the in-game map editor directly. If file is specified, equivalent to -l --load --fps displays the number of frames per second the game is currently running at, in a corner of the screen. -f, --fullscreen runs the game in full screen mode. --gunzip infile.gz decompresses a file which should be in gzip format and stores it without the .gz suffix. The infile.gz will be removed. --gzip infile compresses a file in gzip format, stores it as infile.gz and removes infile. -h, --help displays a summary of command line options to standard output, and exits. -l, --load file loads the savegame file from the standard save game directory. If the -e or --editor option is used as well, starts the editor with the map from file open. If it is a directory, the editor will start with a load map dialog opened there. --log-level=domain1,domain2,... sets the severity level of the log domains. all can be used to match any log domain. Available levels: error, warning, info, debug. By default the error level is used. --logdomains [filter] lists defined log domains (only the ones containing filter if used) and exits --max-fps the number of frames per second the game can show, the value should be between the 1 and 1000, the default is 50. -m, --multiplayer runs a multiplayer game. There are additional options that can be used together with --multiplayer as explained below. Only these additional options can follow --multiplayer. --no-delay runs the game without any delays for graphic benchmarking. This is automatically enabled by --nogui. --nocache disables caching of game data. --nomusic runs the game without music. --nosound runs the game without sounds and music. --path prints the name of the game data directory and exits. --preprocess, -p[=<define1>,<define2>,...] <file/folder> <target directory> preprocesses a specified file/folder. The file(s) will be written in specified target directory: a plain cfg file and a processed cfg file. If a folder is specified, it will be preprocessed recursively based on the known preprocessor rules. The common macroses from the data/core/macros will be preprocessed before the specified resources. define1,define2,... - the extra defines will be added before processing the files. If you want to add them you must add the '=' character before. If 'SKIP_CORE' is in the define list the data/core won't be preprocessed. Example: -p ~/wesnoth/data/campaigns/tutorial ~/result or -p=MULTIPLAYER,MY_OWN_CAMPAIGN ~/wesnoth/data/campaign/camp ~/result --preprocess-input-macros <source file> used only by the '--preprocess' command. Specifies a file that contains [preproc_define]s to be included before preprocessing. --preprocess-output-macros [<target file>] used only by the '--preprocess' command. Will output all preprocessed macros in the target file. If the file is not specified the output will be file '_MACROS_.cfg' in the target directory of preprocess's command. This switch should be typed before the --pre- process command. -r XxY, --resolution XxY sets the screen resolution. Example: -r 800x600 -s, --server [host] connects to the specified host if any, otherwise connect to the first server in preferences. Example: --server server.wesnoth.org --strict-validation validation errors are treated as fatal errors. -t, --test runs the game in a small test scenario. --validcache assumes that the cache is valid. (dangerous) -v, --version shows the version number and exits. -w, --windowed runs the game in windowed mode. --with-replay replays the game loaded with the --load option. Options for --multiplayer The side-specific multiplayer options are marked with number. number has to be replaced by a side number. It usually is 1 or 2 but depends on the number of players possible in the chosen scenario. --ai_confignumber=value selects a configuration file to load for the AI controller for this side. --algorithmnumber=value selects a non-standard algorithm to be used by the AI controller for this side. Available values: idle_ai and sample_ai. --controllernumber=value selects the controller for this side. Available values: human and ai. --era=value use this option to play in the selected era instead of the Default era. The era is chosen by an id. Eras are described in the data/multiplayer/eras.cfg file. --exit-at-end exits once the scenario is over, without displaying victory/defeat dialog which requires the user to click OK. This is also used for scriptable benchmarking. --nogui runs the game without the GUI. Must appear before --multiplayer to have the desired effect. --parmnumber=name:value sets additional parameters for this side. This parameter depends on the options used with --controller and --algorithm. It should only be useful for people designing their own AI. (not yet documented completely) --scenario=value selects a multiplayer scenario by id. The default scenario id is multiplayer_The_Freelands. --sidenumber=value selects a faction of the current era for this side. The faction is chosen by an id. Factions are described in the data/multi- player.cfg file. --turns=value sets the number of turns for the chosen scenario. The default is 50. EXIT STATUS
Normal exit status is 0. An exit status of 1 indicates an (SDL, video, fonts, etc) initialization error. An exit status of 2 indicates an error with the command line options. AUTHOR
Written by David White <davidnwhite@verizon.net>. Edited by Nils Kneuper <crazy-ivanovic@gmx.net>, ott <ott@gaon.net> and Soliton <soliton.de@gmail.com>. This manual page was originally written by Cyril Bouthors <cyril@bouthors.org>. Visit the official homepage: http://www.wesnoth.org/ COPYRIGHT
Copyright (C) 2003-2011 David White <davidnwhite@verizon.net> This is Free Software; this software is licensed under the GPL version 2, as published by the Free Software Foundation. There is NO war- ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
wesnothd(6). wesnoth 2011 WESNOTH(6)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy