if (testCondition() && executeMe() || executeMeOtherwise());
Origin come from bash, to execute if else on a single line:
[ $# == 0 ] && echo 'invalid input' || processInput($*)
If no parameters passed, the echo 'Invalid input' else, start processing the input.
Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts
27 September 2014
10 May 2014
refactor (find and replace in files)
If you want to refactor (find and replace in files) , you could use the following script (on your own)
https://gist.github.com/MuhammadHewedy/dab0116aa288f67d05ba
https://gist.github.com/MuhammadHewedy/dab0116aa288f67d05ba
19 January 2014
jboss7_mod_util
Because the "modules" in jboss7 is the worst thing ever, it like manage maven dependencies by hand...
I decided to write some shell scripts to help me manipulate and organize the modules..
The first script is "mod_create", to create a module....
the second script is "mod_dependency_add", to add module dependency to existing module...
My plan is to add additional scripts for example ...
"mod_modify" to add jars to existing module
Any contributions are welcome .....
The project is on github at:
https://github.com/MuhammadHewedy/jboss7_mod_util
Thanks.
I decided to write some shell scripts to help me manipulate and organize the modules..
The first script is "mod_create", to create a module....
the second script is "mod_dependency_add", to add module dependency to existing module...
My plan is to add additional scripts for example ...
"mod_modify" to add jars to existing module
Any contributions are welcome .....
The project is on github at:
https://github.com/MuhammadHewedy/jboss7_mod_util
Thanks.
26 April 2011
Remove SVN files from a project
From within the project directory, run the following shell command:
find ./ -iname *.svn* -print0 | xargs -0 /bin/rm -rf
Subscribe to:
Posts (Atom)