- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Converting backslash lines to long lines...
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
06-18-2004 03:31 AM
06-18-2004 03:31 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2004 03:37 AM
06-18-2004 03:37 AM
Re: Converting backslash lines to long lines...
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2004 03:53 AM
06-18-2004 03:53 AM
Re: Converting backslash lines to long lines...
Try this
sed 'N;s/\\\n//;N;s/\\\n//' your_file > new_file
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2004 03:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2004 04:26 AM
06-18-2004 04:26 AM
Re: Converting backslash lines to long lines...
XFS[0]="-o async,root=x,\
access=a:b:c \
/fileshare"
want
XFS[0]="-o async,root=x,access=a:b:c /fileshare"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2004 04:35 AM
06-18-2004 04:35 AM
Re: Converting backslash lines to long lines...
Doesn't it work?.
$cat text
XFS[0]="-o async,root=x,\
access=a:b:c \
/fileshare"
$sed 'N;s/\\[ ]*\n//;N;s/\\[ ]*\n//' text
XFS[0]="-o async,root=x,access=a:b:c /fileshare"
Note that you have to type [
-Sri
PS: No more further points for me please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2004 06:42 AM
06-18-2004 06:42 AM
Re: Converting backslash lines to long lines...
In -r raw mode, \ at the end of a line does not signify line continuation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2004 12:25 PM
06-21-2004 12:25 PM
Re: Converting backslash lines to long lines...
#!/bin/sh
# Scriptname: catx
LS="XFS"
NEW_LINE=""
while read LINE
do
echo "$LINE" | grep -q "^$LS"
[[ "$?" = "0" ]] && {
NEW_LINE="$(echo "$LINE"|tr -d '\\'|tr -d '\012')"
print "$NEW_LINE"
} || {
NEW_LINE="${NEW_LINE}${LINE}"
}
done
I've used it for listing our /etc/exports, but then I used LS="/"
Usage:
cat file | catx
/Tor-Arne