A Language is not worth knowing unless it teaches you to think differently.
Wednesday, December 26, 2012
Get the input from command line(STDIN) & Write into File & Display in STDOUT put
#!/bin/bash
echo -e "Enter the Rollno";
read rollNo;
echo -e "Enter the Name";
read name;
echo -e "Enter the Marks";
read marks;
echo "$rollNo|$name|$marks" > studentDb
echo -e " StudentDb is created....."
echo -e " StudentDb records :"
cat studentDb
OUTPUT :
-bash-3.2$ sh HelloWorld
Enter the Rollno
07mx10
Enter the Name
Chidambaram
Enter the Marks
100
StudentDb is created.....
StudentDb records :
07mx10|Chidambaram|100
Here
#!/bin/bash --> the program will run in bash shell
read <variable> ---> is used to get the input from keyboard, no need to define any data types.
> --> is used to redirect the output into studentDb file
cat studentDb --> the file content is displayed in command line
Subscribe to:
Post Comments (Atom)
Price List Query for Item
SELECT qph.list_header_id, qph.name, qph.description, qphh.start_date_active, qphh.currency_code, q...
-
1. To download Ldt file for a Concurent Program FNDLOAD [username]/[password] O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_nam...
-
Here the article will describe about how to register WebADI to Responsibility menu Go to System Administrator --> Security --> Respo...
-
using the below query can check the invoice status. SELECT DECODE(AP_INVOICES_UTILITY_PKG.GET_APPROVAL_STATUS(AIA.INVOICE_...
No comments:
Post a Comment