I tried the following command;
cat myfile.txt | tr '\014' '\015\012' > myfile.out
but this didnt seem to do anything. I was thinking that I need to replace a single character with another single character, not multiple characters
I have a text file with the '\f' character that I need to replace with the characters '\r\n'. I have tried the 'TR' command but that failed.
Can anybody please advise how I do this?
Thanks Annihilannic, adding the "eval" command as per your suggestion has resolved my problem nicely. The file I was trying to PUT was copied successfully [thumbsup]
I have amended the "-c" command entry to include a "lcd", such that
tmpSambaCommand="$smbclientEXE //${AXWINSERVER}/${AXWINSHARE} -I ${AXWINIP} -A ${AXSMBAUTH} -d 2 -c \"lcd; put ${tmpFileToCopy}; exit;\""
echo $tmpSambaCommand
$tmpSambaCommand;;
This had the following affect;
It still hangs.
Hi,
I am having difficulty tranferring a file from my UNIX server to a Windows Share using the Samba client - smbclient, from a UNIX SH script
When I execute the following command from the shell prompt, it works perfectly;
/opt/samba/bin/smbclient //MyWinServer/MyWinShare$ -I 10.85.0.89 -A...
I tried many solutions which didnt give me the desired effect. I eventually went with the following;
tr '\014' '\012'
Seemed to work for me
Thanks to those who responded [smile]
That did work, but not quite how I expected. I need another blank line. I'd therefore need something like ; tr '\014' '\012\012'
Obviously, I can't do that because there's a mismatch of number of characters.
Is there any other method of doing this? Is it possible using 'sed'?
Hi,
I have a need to replace a FF character (Form Feed) in a printer spool file with a CRLF (Carriage Return & Line Feed).
I previously replaced the FF character with a blank character using the TR command (e.g: tr '\014' ' '), but I now need to insert a blank line too.
Can anybody help please?
I implemented the most recent AWK code. That has worked for me and resolved my predicament. [thumbsup2]
Thanks to PHV & also to those who offered their advice.
I have a fixed format text file which I need to convert to CSV. As this will need to be done repeatedly can you please tell me how I can do this via scripting?
My file currently looks something similar to this below;
I'd like for the output to be converted so that it looks similar to this...
Can anybody please provide me with some advice/guidance notes for installing Progress openEdge 10.1c on UNIX (HP-UX Itanium)?
On the server, I currently have v9.1e and 10.1b, but need to install 10.1c alongside. Obviously, versions can co-exist, but I do not want to upset these current...
In my script I have created a list of subdirectories. How can I present this list formatted in to four columns?
i.e.
Folder1 Folder2 Folder3 Folder4
Folder5 Folder6 Folder7 Folder8
So far I have the following;
for tmpDIR1 in `ls -l /opt/myapp | grep '^d' |awk '{print $9}'`; do
if [ -d...
I managed to resolve my problem with the following script code;
cd $srcFolder
for aFile in `ls -C *.*`; do
if [ ! -f $trgFolder/$aFile ]; then
echo "Missing file: $aFile"
fi
done
Can anybody please help with the following script source code?
I have a script which is executed every 15 mins via a Crontab entry. In the script I set a counter initially to zero. If a particular file exists, I read the counter value stored. If it equals 3 I set it to zero. If the counter is...
Thanks for your reply.
The bitmap was actually encoded in the PCL file by a 3rd party application whose supplier stated that they were unable to help with the printing issue. In the end we dropped the added bitmap as we could not pursue the problem any further.
I have some UNIX software which runs in a windows environment via some Telnet software. This UNIX software calls a script which passes a PCL file to a users windows default printer using the following source code;
(echo "\0033\0133\0065\0151\c"
cat $spoolfile
echo "\0033\0133\0064\0151\c"...
Nothing to be honest!.
I have some experience of UNIX scripting but currently only regard myself as a novice. I am learning though or at least trying to.
With having some experience of Solaris I was thinking of something along the lines of;
lc $2 | foreach $1 in $2.......
however the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.