Sponsored Content
Full Discussion: Checking commandline
Top Forums Shell Programming and Scripting Checking commandline Post 302761299 by Manueldo on Friday 25th of January 2013 11:56:06 AM
Old 01-25-2013
Checking commandline

Code:
mymk [-f file] target

How to check is [-f file] on commandline or no?
Cannot to find out ;(
Know that I need to use if.....new in shell sorry


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data.

Last edited by vbe; 01-25-2013 at 01:06 PM.. Reason: code tags
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

list only directories in commandline.

I want to list only directories in the command line using ls command. Can anyone please help me. (9 Replies)
Discussion started by: jhmr7
9 Replies

2. Shell Programming and Scripting

Validating commandline argument

Hi, I am calling a script script2.shl from script1.shl as below script2.shl "TABLE_NAME" -r 10 In that I have to validate the parameter 4. i.e : it should be only 10 20 30 40 50 I know that I can do it by checking like below if ]; then echo "TRUE" else echo "FALSE" fi ... (3 Replies)
Discussion started by: mr_manii
3 Replies

3. Shell Programming and Scripting

$OPTARG changes commandline input

Hi there, I hope, that I do not open an thread, that is already existing, but I didn't found something matching with my problem while searching for problems with "getopts" My problem ist, that I'm taking arguments from commandline into my script with getopts, I've an flag -s, after that there... (2 Replies)
Discussion started by: thommes_pommes
2 Replies

4. Shell Programming and Scripting

Using curl in commandline

Hi, I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command: /usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies

5. Shell Programming and Scripting

Multiple commandline switches

I have a script that has commandline switches that work no problem. But i don't know how to enable it to have multiple switches at one time. So I'd want myscript -h -o or even myscript -ho but i'm having no luck incorporating this. I tried shifting but i'm not getting it. Thanks ----------... (0 Replies)
Discussion started by: DC Slick
0 Replies

6. Shell Programming and Scripting

AWK Script and Commandline difference

Hey there, I just stumbled upon a difference between using awk on the commandline and using it in a shellscript. I have a variable, e.g.: PROG=vim then i want to check if the package with this name is installed: TEMPVAL=$(dpkg -l | awk '{ if ($2 == "$PROG") print $2 }') (Im using... (10 Replies)
Discussion started by: MrSnail
10 Replies

7. OS X (Apple)

Opening Applications from the commandline

as you probably/may know, one can open any application from the application folder with the command open -a program_name I found that out today and so I created aliases in .bash_profile and they work. alias safari="open -a safari" alias gimp="open -a gimp" alias seamonkey="open -a... (0 Replies)
Discussion started by: butterbaerchen
0 Replies

8. UNIX for Dummies Questions & Answers

Load config file at commandline

Hello, This would be very basic question to most of you, but for me as a newbie it is an un-know. I would like to load a configuration file into memory before executing a specific command. For example: I have a config file that holds all the database connectivity information and I'd like to... (5 Replies)
Discussion started by: babyPen1985
5 Replies

9. Shell Programming and Scripting

Script executed by Cron or commandline

Hello all, I have a question regarding the difference betwen cron and command line. What I would like to do is to print a statement into a logfile if a script has been executed from cron or from command line. It should be as: #!/bin/bash if <Check if this script has been... (3 Replies)
Discussion started by: API
3 Replies
FSVS - URL format(5)						       fsvs						      FSVS - URL format(5)

NAME
Format of URLs - FSVS can use more than one URL; the given URLs are overlaid according to their priority. FSVS can use more than one URL; the given URLs are overlaid according to their priority. For easier managing they get a name, and can optionally take a target revision. Such an extended URL has the form ['name:'{name},]['target:'{t-rev},]['prio:'{prio},]URL where URL is a standard URL known by subversion -- something like http://...., svn://... or svn+ssh://.... The arguments before the URL are optional and can be in any order; the URL must be last. Example: name:perl,prio:5,svn://... or, using abbreviations, N:perl,P:5,T:324,svn://... Please mind that the full syntax is in lower case, whereas the abbreviations are capitalized! Internally the : is looked for, and if the part before this character is a known keyword, it is used. As soon as we find an unknown keyword we treat it as an URL, ie. stop processing. The priority is in reverse numeric order - the lower the number, the higher the priority. (See url__current_has_precedence() ) Why a priority? When we have to overlay several URLs, we have to know which URL takes precedence - in case the same entry is in more than one. (Which is not recommended!) Why a name? We need a name, so that the user can say 'commit all outstanding changes to the repository at URL x', without having to remember the full URL. After all, this URL should already be known, as there's a list of URLs to update from. You should only use alphanumeric characters and the underscore here; or, in other words, w or [a-zA-Z0-9_]. (Whitespace, comma and semicolon get used as separators.) What can I do with the target revision? Using the target revision you can tell fsvs that it should use the given revision number as destination revision - so update would go there, but not further. Please note that the given revision number overrides the -r parameter; this sets the destination for all URLs. The default target is HEAD. Note: In subversion you can enter URL@revision - this syntax may be implemented in fsvs too. (But it has the problem, that as soon as you have a @ in the URL, you must give the target revision every time!) There's an additional internal number - why that? This internal number is not for use by the user. It is just used to have an unique identifier for an URL, without using the full string. On my system the package names are on average 12.3 characters long (1024 packages with 12629 bytes, including newline): COLUMNS=200 dpkg-query -l | cut -c5- | cut -f1 -d' ' | wc So if we store an id of the url instead of the name, we have approx. 4 bytes per entry (length of strings of numbers from 1 to 1024). Whereas using the needs name 12.3 characters, that's a difference of 8.3 per entry. Multiplied with 150 000 entries we get about 1MB difference in filesize of the dir-file. Not really small ... And using the whole URL would inflate that much more. Currently we use about 92 bytes per entry. So we'd (unnecessarily) increase the size by about 10%. That's why there's an url_t::internal_number. Author Generated automatically by Doxygen for fsvs from the source code. Version trunk:2424 11 Mar 2010 FSVS - URL format(5)
All times are GMT -4. The time now is 01:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy