date
i want sysdate so that is i am create one shell script like
oracle]$vi date.sh #!/bin/bash a = $date echo = a shift + zz it is right or i want to use this script in another script like #!/bin/bash ./exp ....... file=file_name_date ( in date word i want to store sysdate ) how can i do that ... plz. help thanx. |
you do not need work hard this much. Lets say you want to create a file with name my_file_currentdate then do the following in you script
Code:
echo "This is my test file" >> my_file_$(date +%Y-%m-%d) |
thank you sir your reply but i have one question here ....
#!/bin/bash ./exp ....... file=file_name_date ( in date word i want to store sysdate ) i want to run above script in script how can show date according ur solution echo " content" >> myfile .... with "This is my test file" as content. sir plz explain more i cann't understand above line.... reply plz i am in very trouble... |
thank you sir your reply but i have one question here ....
#!/bin/bash ./exp ....... file=file_name_date ( in date word i want to store sysdate ) i want to run above script in script how can show date according ur solution echo " content" >> myfile .... with "This is my test file" as content. sir plz explain more i cann't understand above line.... reply plz i am in very trouble... or sir can i use like this in my script... #!/bin/bash ./exp hr/hr tables=employees file=/db/bkp/exp_$date( +%Y-%m-%d) log= |
use file=/db/bkp/exp_$(date +%Y-%m-%d)
|
What are you trying to accomplish? Please try to better explain yourself.
|
All times are GMT -5. The time now is 02:19 AM. |