- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- multiple renames
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
Forums
Discussions
Discussions
Discussions
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
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
01-02-2002 01:13 PM
01-02-2002 01:13 PM
multiple renames
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2002 01:23 PM
01-02-2002 01:23 PM
Re: multiple renames
ls *.html > filename.out
sed 's/.html//g' filename.out > filename1.out
for i in `cat filename1.out`
do
mv $i.html $i
done
That should work for you.
GL,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2002 01:24 PM
01-02-2002 01:24 PM
Re: multiple renames
find . -type f -name "*.html" | sed "s/\.html$//" | xargs -i mv {}.html {}
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2002 01:27 PM
01-02-2002 01:27 PM
Re: multiple renames
From your description, I believe that what you really want/need to do is to unshar the patches and collect them into a single depot for installation. Assuming that this is true, and assuming that the patches are titled "PHxx.html", do this:
PDIR=/tmp/patch_depot
cd /tmp
for X in PH*.html
do
sh ${X}
done
mkdir ${PDIR}
for X in PH*.depot
do
swcopy -s ${PWD}/${X} \* @ ${PDIR}
done
...now you can 'swinstall' with one reboot (if necessary) using 'tmp/patch_depot' as the source depot
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2002 01:28 PM
01-02-2002 01:28 PM
Re: multiple renames
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2002 01:29 PM
01-02-2002 01:29 PM
Re: multiple renames
You really don't need to because sh PHNE_12345.html works just as well as sh PHNE_12345 and does not append the .html to the .depot and .text files in either case. In fact, you can download all the files into a directory and simply sh PH* and that will unshare the files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2002 12:31 AM
01-03-2002 12:31 AM
Re: multiple renames
Assuming you still want to do this, here's a way without using sed:
for file in *.html ; do
echo mv $file ${file%.html}
done
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2002 12:33 AM
01-03-2002 12:33 AM
Re: multiple renames
Please scrub the "echo" from my previous reply to actually run it, this was to preview the commands.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2002 05:56 AM
01-03-2002 05:56 AM
Re: multiple renames
I just wanted to give you a heads up if you don't know about the
If you downloaded from the web which I assume you did via the .html extensions. I usally get html code at the begining that needs to be removed before I run the sh command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2002 07:14 AM
01-03-2002 07:14 AM
Re: multiple renames
for x in `ls *.html`
do
file=`echo $x | cut -f1 -d"."`
mv $x $file
done
...jcd...