Script that Nulls Contents of Files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script that Nulls Contents of Files
# 1  
Old 06-25-2010
Script that Nulls Contents of Files

Ok,

I'm stuck here with a plan to get what I need done completed.

I want to use perl to produce a document. lets say the document will be a pdf document.

Now, is there a way for me to put a tiny little code in that pdf document that can make the pdf file null itself if run on a non-unix machine, i.e windows?

i know this is a unique thing i'm asking here. but can someone please help me out here?

a summary of what i'm asking is this?

how to create a pdf (or any file), that contains a code. this code should be able to ping/contact an external website, and based on the response it gets back from the external server, it should decide to either leave the pdf file alone or null it?

makes sense?
# 2  
Old 06-26-2010
1. check what is the type of OS
2. according to it do the required operation..

what more you want .. you have all clarity already ?
# 3  
Old 06-27-2010
You can probably do what you want to do using JavaScript embedded in the PDF document. Lots of information available on the Internet.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

2. Shell Programming and Scripting

Replace nulls with a value in a file

Hi, I've a PIPE delimited file with about 5 fields. Sometimes the records in the 4th field is null, so I want to replace it based on values we get it on 2nd field in the same file. Following is an example. ABCD|X-TYPE 3.0|2010|X-TYPE|20000 CDEF|C-TYPE 2.5|2011|C-TYPE|10000 XYZ|LX... (4 Replies)
Discussion started by: rudoraj
4 Replies

3. Shell Programming and Scripting

Shell script to find and replace contents of files in directory

Hi all This is my first post. Please bear with me with all my mistakes. I started learning shell since couple of days now and this might be quite basic for all, i want to search for files in a directory containing specific string and replace it with new string. The code i wrote is quite bulky... (2 Replies)
Discussion started by: theprogrammer
2 Replies

4. Shell Programming and Scripting

Need Script to copy the contents of two files into one file

Hi i need Script to copy the contents of two files into one file i have 2 fil X1.txt / X2.txt i need script to copy the contents of X1 and X2 In AllXfile X1.txt File X1 X2.txt File X2 AllXfile.txt File X1 File X2 (2 Replies)
Discussion started by: azzeddine2005
2 Replies

5. UNIX for Advanced & Expert Users

How to find duplicates contents in a files by comparing other files?

Hi Guys , we have one directory ...in that directory all files will be set on each day.. files must have header ,contents ,footer.. i wants to compare the header,contents,footer ..if its same means display an error message as 'files contents same' (7 Replies)
Discussion started by: Venkatesh1
7 Replies

6. Shell Programming and Scripting

Shell Script to store contents of multiple files into one

Hi, I"m writing a script to store all the contents of multiple files with different file names into one single file. I am giving in only last modified date of file in a folder. The below script gives a list of just one file based on the input date i give which is taken as string variable. I... (2 Replies)
Discussion started by: ashrocks
2 Replies

7. Shell Programming and Scripting

Replacing nulls using sed

Hi, I am trying to replace nulls with spaces in every record of a '|' delimited file. I used this command - cat input.dat | sed 's/||/| |/g' > output But if a space appears twice '| | |' , then only the first null is getting replaced with a space. The second one remains as a null. I... (7 Replies)
Discussion started by: novice1324
7 Replies

8. Programming

Blanks vs: Nulls

I'm relatively new to Pro*C programming. In the following example: char name; EXEC SQL SELECT 'John Doe' INTO :name FROM DUAL; "John Doe" is in positions 0-7, blanks in 8-19, and a null in 20. I would really prefer the null to be in position 8 and I don't care what's after that. I wrote a... (1 Reply)
Discussion started by: ebock
1 Replies

9. UNIX for Dummies Questions & Answers

GREPing for Nulls

I just had a filesystem / file corruption issue on my HSP's server due to disk capacity limits and fileswapping. I discovered that certain files got corrupted when fileswapping was not successful and they ended up with a string of control characters, or what I believe to be nulls, in them. Does... (4 Replies)
Discussion started by: Dr. DOT
4 Replies

10. Shell Programming and Scripting

replacing contents of files from a bash script

I'm writing a shell script and I need to replace the contents of a configuration file based on what is passed to the script...can I replace expressions in a file from a bash shell script? (2 Replies)
Discussion started by: HumanBeanDip
2 Replies
Login or Register to Ask a Question