1825764 Members
2075 Online
109687 Solutions
New Discussion

Saving script file

 
TYP3R
Frequent Advisor

Saving script file

Hi all

Bear with me as i new to scripting but so far the admin but no longer working in my company save the results from a script thats been run into the memory buffer and sends it to the printer but I need to save the results from the script into a folder naming itself from a 6 digit input that i've already inputted when the script been running. What commands do i need to insert at the end of the script to perform this ? Any help would be great. I could attach the script in here for the geru's to plonder and give me some advice once i get back to work

Will
1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: Saving script file

Before you send the results to the printer, you need to copy it to the file:
mkdir -p $folder_name
cp output $folder_name/results

If you want to capture all output from the script, you will have to wrap that script with another to save the output. And the outer script must get the 6 digit directory name.