Sponsored Content
Top Forums Shell Programming and Scripting Convert this Windows script so I can use it on Macbook Post 302693795 by Corona688 on Wednesday 29th of August 2012 05:40:04 PM
Old 08-29-2012
If you wrote it up in Microsoft Notepad, it will be full of carriage returns which will cause it to fail.

Code:
tr -d '\r' < wingarbage > fixedfile

This User Gave Thanks to Corona688 For This Post:
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to convert unix .ksh script to windows .batch script

I am using awk in my .ksh script but when I am trying to run in windows its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like. thanx. #!/bin/ksh egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies

2. Shell Programming and Scripting

Trying to convert utf-8 to WINDOWS-1251

Hello all i have utf-8 file that i try to convert to WINDOWS-1251 on linux without any success the file name is utf-8 when i try to do : file -bi test.txt it gives me : text/plain; charset=utf-8 when i try to convert the file i do : /usr/bin/iconv -f UTF-8 -t WINDOWS-1251 test.txt >... (1 Reply)
Discussion started by: umen
1 Replies
HTTP::Cookies::Microsoft(3)				User Contributed Perl Documentation			       HTTP::Cookies::Microsoft(3)

NAME
HTTP::Cookies::Microsoft - access to Microsoft cookies files SYNOPSIS
use LWP; use HTTP::Cookies::Microsoft; use Win32::TieRegistry(Delimiter => "/"); my $cookies_dir = $Registry-> {"CUser/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders/Cookies"}; $cookie_jar = HTTP::Cookies::Microsoft->new( file => "$cookies_dir\index.dat", 'delayload' => 1, ); my $browser = LWP::UserAgent->new; $browser->cookie_jar( $cookie_jar ); DESCRIPTION
This is a subclass of "HTTP::Cookies" which loads Microsoft Internet Explorer 5.x and 6.x for Windows (MSIE) cookie files. See the documentation for HTTP::Cookies. METHODS
The following methods are provided: $cookie_jar = HTTP::Cookies::Microsoft->new; The constructor takes hash style parameters. In addition to the regular HTTP::Cookies parameters, HTTP::Cookies::Microsoft recognizes the following: delayload: delay loading of cookie data until a request is actually made. This results in faster runtime unless you use most of the cookies since only the domain's cookie data is loaded on demand. CAVEATS
Please note that the code DOESN'T support saving to the MSIE cookie file format. AUTHOR
Johnny Lee <typo_pl@hotmail.com> COPYRIGHT
Copyright 2002 Johnny Lee This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.1 2009-06-13 HTTP::Cookies::Microsoft(3)
All times are GMT -4. The time now is 03:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy