10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
]I have a string like "/abc/cmind/def/pq/IC.2.4.6_main.64b/lnx86" and this string is given by user. But in this string instead of 64b user may passed 32 b an i need to parse this string and check wether its is 32b or 64 b and according to it i want to set appropriate flags.
How will i do this... (11 Replies)
Discussion started by: codecatcher
11 Replies
2. Shell Programming and Scripting
Please forgive me if this is the wrong forum. I want to execute some one liners with the groovy programming language and I'm having trouble escaping the special characters to accommodate bash.
Here is one of the lines that is giving me trouble:
groovy -e "(new... (1 Reply)
Discussion started by: siegfried
1 Replies
3. UNIX for Dummies Questions & Answers
I have this tcsh code that I want to convert to a bash script. Basically it accepts command line arguments supplied by the user and stores them, so they can be used to run a C++ program.
set arg_browseDir_inFileLst = ""
set allArgsUpCase = `echo "$*" | tr '' ''`
set opt_browseDir_flag =... (17 Replies)
Discussion started by: kristinu
17 Replies
4. Shell Programming and Scripting
I'm pretty new to bash scripting and I've found myself writing things like this (and the same with even more nesting):
if $CATEGORIES; then
if $LABEL_SLOTS; then
$pyth "$wd/texify_grammar.py" "$input" "$texfile" "--label-slots" "--categories" "$CATEGORY_LIST"
... (9 Replies)
Discussion started by: burbly
9 Replies
5. Programming
Hi,
I've a python script called aaa.py and passing an command line option " -a" to the script like, ./aaa.py -a
& Inside the script if the -a option is given I do some operation if not something else.
code looks like
./aaa.py -a
.
.
if options.a
---some operation---
if not options.a... (1 Reply)
Discussion started by: testin
1 Replies
6. Shell Programming and Scripting
hi,,,,
I want to create a command prompt, for example "prompt>", so my prompt need to handle commands, for example "prompt>cmd", so i want to know how to get arguments for my own commands cmd, i.e. default argc should contain arguments count and argv should point to the argument vector i.e, for... (2 Replies)
Discussion started by: vins_89
2 Replies
7. UNIX for Dummies Questions & Answers
hi, can someone how to accept command line arguments as a variable using in script?
like: ./scriptname arguments
by accept arguments, I can use it in my script?
thx! (1 Reply)
Discussion started by: ikeQ
1 Replies
8. UNIX for Dummies Questions & Answers
I am working on a script wherein i need the user to enter the Build ID
for eg:the command line will show
enter the build ID
Now on entering the build ID it should be assigned to @ARGV.
How can this be done.? (1 Reply)
Discussion started by: Varghese
1 Replies
9. Shell Programming and Scripting
If no arguments are entered I wanna be able to read 2 arguments, i have done like this but it doesnt work:
x=0
until #loop starts
do
if ; then
echo No arguments were entered, please enter 2 arguments.
read $1 $2
elif || ; then
echo $#... (0 Replies)
Discussion started by: Vozx
0 Replies
10. UNIX for Advanced & Expert Users
Is there a way to get the command line arguments.
I am using getopt(3) but if the arguments are more than one for a particular option than it just ignores the second argument. For eg
./a.out -x abc def
now abd will be got with -x using getopt "( x : )" and string abc\0def will get stored... (7 Replies)
Discussion started by: jayakhanna
7 Replies