Sponsored Content
Top Forums Shell Programming and Scripting How to check the user input to be valid using shell script? Post 302774465 by hyeewang on Saturday 2nd of March 2013 12:35:48 AM
Old 03-02-2013
Thank you 2.
I got your idea although I can not run your code due to compile error.
Is there any convenient command to convert or substitute "rwxr-xr-x" to be "111101101"?
That means "change "r","w","x" to be "1", "-" to be "0".
After that, I want to change binary to octal format by "bc"? Is it a good method by "bc"?
I am a beginner. thanks for help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check for a valid numeric input

Hi Folks, I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help.. thanks in adv. Br/// Vijay. (1 Reply)
Discussion started by: Vijayakumarpc
1 Replies

2. Shell Programming and Scripting

SQL PLUS Command 'ACCEPT' is not waiting for user input with sh shell script

Dear All, The sqlplus 'Accept' command is not waiting for user input when I include the command within a shell script. Note: The 'Accept' command is working fine if I execute it in a SQLPLUS Prompt. Please fins the below sample script which i tried. SCRIPT: -------- #!... (4 Replies)
Discussion started by: little_wonder
4 Replies

3. Shell Programming and Scripting

User Input Shell Script

Hello I am trying to create a user input shell scipt. The objective is user should enter the circuit number and the input is saved in a log file. If the user does not enter anything then the question should prompt it until the circuit no. is entered. Can any one please correct the code below.... (3 Replies)
Discussion started by: sureshcisco
3 Replies

4. Shell Programming and Scripting

shell script to take input from a text file and perform check on each servers and copy files

HI all, I want to script where all the server names will be in a text file like server1 server2 server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies

5. Homework & Coursework Questions

Bash shell - Check if value is valid directory.

1. The problem statement, all variables and given/known data: The script usage will be as follows: library.third source_directory - Your script will display an appropriate error message and exit with status 3 if no parameters are given - Your script will display an appropriate error... (2 Replies)
Discussion started by: netmaster
2 Replies

6. Shell Programming and Scripting

How to get the user input recursively until the user provides valid input

Hi, echo "Enter file name of input file list along with absolute path : " read inputFileList if then for string in `cat inputFileList` do echo $string done else echo " file does not exist" fi From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies

7. Shell Programming and Scripting

create an array which can store the strings from the user input in shell script

I want to create an array which can store the strings from the user input in shell script . example :- I want to store the 5 fruits name in a single array which the user provides . (1 Reply)
Discussion started by: Pkast
1 Replies

8. Shell Programming and Scripting

Shell script to accept user input on the fly

I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it should respond to that action. say, when user presses the key A - more information should be printed... (2 Replies)
Discussion started by: Arun_Linux
2 Replies

9. Shell Programming and Scripting

Need a script to check if an argument is valid shell variable

I need a script that should print 'yes' if the argument is a valid shell variable name else 'No' if it is not a valid shell variable. A valid one begins with an alphabet or percentage (%) character and is followed by zero or more alphanumberic or percentage (%) characters. For example: $... (6 Replies)
Discussion started by: pingiliarjun
6 Replies

10. Shell Programming and Scripting

Recording user input from interactive shell script

Hello, I want to start out by saying that I am fairly new to scripting and am looking for someone that can point me in the right direction. Basically what I need is a way to run a interactive script that will prompt users with questions weather that be yes/no or a specific answer.. I want to be... (3 Replies)
Discussion started by: shoutcast
3 Replies
SVN-BISECT(1)						      General Commands Manual						     SVN-BISECT(1)

NAME
svn-bisect - Bisect Subversion revisions to find a regression SYNOPSIS
svn-bisect start [good_rev [bad_rev]] svn-bisect {good|bad} [rev] svn-bisect run command svn-bisect reset svn-bisect status DESCRIPTION
svn-bisect helps to automate finding a bug or behavior change in a Subversion working copy. Given an initial "good" revision, with the desired or original behavior, and a newer "bad" revision, with the undesired or modified behavior, svn-bisect will do a binary search through the revision range to find which revision caused the change. svn-bisect must be initialized in a working copy, with svn-bisect start. It also needs to be given at least one good revision (the base- line) and one bad revision (known modified behavior) revision. Sub-commands: start Initializes or reinitializes svn-bisect; optionally takes good and bad revision parameters. good rev bad rev Tells svn-bisect that a revision is good or bad, defining or narrowing the search space. If not specified, revision defaults to the current revision in the working copy. svn-bisect will then update to a revision halfway between the new good and bad boundaries. If this update crosses a point where a branch was created, it switches in or out of the branch. reset Resets the working copy to the revision and branch where svn-bisect start was run. In the simple case this is equivalent to rm -r .svn-bisect; svn update, but not if it has crossed branches, and not if you did not start at the HEAD revision. In any case, svn-bisect never keeps track of mixed-revision working copies, so do not use svn-bisect in a working copy that will need to be restored to mixed revisions. status Prints a brief status message. run command Runs the bisection in a loop. You must have already defined initial good and bad boundary conditions. Each iteration through the loop runs command as a shell command (a single argument, quoted if necessary) on the chosen revision, then marks the revision as good or bad, based on the exit status of command. EXAMPLES
Assume you are trying to find which revision between 1250 and 1400 caused the make check command to fail. svn-bisect start 1250 1400 svn-bisect run 'make check' svn-bisect reset ENVIRONMENT
SVN The Subversion command-line program to call (default svn). FILES
.svn-bisect The directory containing state information, removed after a successful bisection. SEE ALSO
git-bisect(1). AUTHOR
Written by Robert Millan and Peter Samuelson, for the Debian Project (but may be used by others). 2009-10-22 SVN-BISECT(1)
All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy