- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script to move files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 12:53 AM
тАО06-09-2011 12:53 AM
Re: script to move files
syntax error: `(' unexpected
Then use quotes: echo "scp -p $(< file_list)"
># echo $SHELL
This only works if you don't invoke a different shell.
Try: ps -fp $$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 01:20 AM
тАО06-09-2011 01:20 AM
Re: script to move files
I am lost:
root@nrtrde2 # ls file_list
file_list
root@nrtrde2 # echo "scp -p $(< file_list)"
scp -p $(< file_list)
root@nrtrde2 # ps -fp $$
UID PID PPID C STIME TTY TIME CMD
root 23099 23097 0 12:22:01 pts/1 0:00 -sh
root@nrtrde2 #
the echo just yields that
regards
F.R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 02:07 AM
тАО06-09-2011 02:07 AM
Re: script to move files
After you type escape in your real shell, what version does control-V show?
When I do that echo:
$ echo "scp -p $(< file_list)"
sh: file_list: Cannot find or open the file.
(Because I don't have file.)
About the only way that echo can produce that output is if the file "file_list" contains the string:
$(< file_list)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 02:37 AM
тАО06-09-2011 02:37 AM
Re: script to move files
Its now working fine, what I did was to use as a second marker as file (/tmp/ref3) file with a much shorter period of time 201104052359.
Files are now being sent to the other server, but I will have create several chunks of markers in order to send all the April files.
Thank you for your help
regards
Fernando
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 02:49 AM - last edited on тАО08-08-2011 01:33 PM by Kevin_Paul
тАО06-09-2011 02:49 AM - last edited on тАО08-08-2011 01:33 PM by Kevin_Paul
Re: script to move files
Hi (again) Fernando:
> Thank you for your help
If you are satisfied with the help that you received, please read the following about assigning points:
http://h30499.www3.hp.com/t5/help/faqpage/faq-category-id/kudos#kudos
Regards!
...JRF..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 04:17 AM
тАО06-09-2011 04:17 AM
Re: script to move files
I did run the those comands on the prompt. If I put those on a script will it work?
regards
Fernando
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 05:09 AM
тАО06-09-2011 05:09 AM
Solution> I did run the those comands on the prompt. If I put those on a script will it work?
Yes. However, if you plan to run your script from a 'crontask' remember that 'cron' establishes a minimal environment. In particular, any environmental variables that are in your 'profile's will be missing. Plan ahead accordingly, of course. See the manpages for 'crontab' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2011 05:31 AM
тАО06-09-2011 05:31 AM
Re: script to move files
- « Previous
-
- 1
- 2
- Next »