kode yard
all about C++ and PHP
Friday, November 5, 2010
oracle form tutorial
Oracle Forms Tutorial (www.aboutoracleapps.com)
View more
presentations
from
magupta26
.
Saturday, May 8, 2010
utility script-2
This is a shell script that automates the compilation of single c/c++ source file and executes this.
<br /><br />#!/bin/bash<br />#Developed by : lipun4u@gmail.com<br /><br />file_name=$1<br />c_extension=".c"<br />cpp_extension=".cpp"<br />ip_file_name="$file_name$c_extension"<br />i=0<br /><br />if [ $# -ne 1 ]<br />then<br /> echo "Usage: `basename $0` <source-file>"<br /> echo "Source file should be without extension"<br /> echo "e.g :-`basename $0` test" <br /> exit 1<br />fi<br /> <br />if [ -f $ip_file_name ]<br />then<br /> echo "compiling c-source file $file_name ....."<br /> gcc -o $file_name $ip_file_name -lpthread<br /> if [ $? -eq 0 ]<br /> then <br /> i=1<br /> fi<br />else<br /> ip_file_name="$file_name$cpp_extension"<br /> if [ -f $ip_file_name ]<br /> then<br /> echo "compiling c++-source file $file_name ....."<br /> g++ -o $file_name $ip_file_name -lpthread<br /> if [ $? -eq 0 ]<br /> then<br /> i=1<br /> fi<br /> else<br /> echo "compilation failed"<br /> exit 1<br /> fi<br />fi<br /><br />if [ $i -eq 1 ]<br />then<br /> echo "Output file name : $file_name"<br /> echo "Executing......"<br /> echo<br /> ./$file_name<br /> exit_status=$?<br /> if [ $exit_status -ne 0 ]<br /> then<br /> echo "Program execution failed with exit status $exit_status"<br /> exit 1<br /> fi<br /> echo<br /> echo "Program executed successful"<br />fi<br /><br />
Saturday, May 1, 2010
utility script-1
This is an utility script that makes a file executable and opens in vi editor.
<br /><br />#!/bin/bash<br />#Developed by : lipun4u@gmail.com<br /><br /><br />if [ $# -ne 1 ] <br />then<br /> echo "Usage: `basename $0` <filename>"<br /> exit 1<br />fi<br /><br />touch $1<br />chmod u+x $1<br />vi $1<br /><br />
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)