answersLogoWhite

0


Best Answer

Your question is unclear; Are you talking about reading a filename that happens to contain PDF, or reading a PDF file itself?

The shell script doesn't know or care what kind of files you are using. It all depends on what you intend to do with the file.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you read a pdf file name using a shell script?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the command to execute a shell script?

If the shell script is readable and executable then to execute it just type the name of the shell script file. Otherwise, you can explicity call a shell interpreter to run the file as a shell script, i.e., ksh myfile


How do you write shell scripting in UNIX?

A shell script is nothing more than a readable and executable ASCII text file. In this file you put all of the commands that you want to execute, in sequence. The name of the file can be anything you like. Any text editor (VI, VIM, pico, etc) can create a shell script file In addition, shell script files have the ability to detect logic, and are programmable. Just think about what tasks you want to perform and their order, and put it into a file, and there you have a shell script.


Write a shell program using the if-the-else to test whether a variable name is a directory or a file?

# shell script example if [ -f $1 ]; then echo $1 is a file elsif [ -d $1 ]; then echo $1 is a directory fi


What is the procedure of execute a script in shell in ubantu?

For any Unix or Linux based operating system, make the text file readable and executable and then invoke (call) it by the file name, which will execute the script.


How you can create a script file using VI editor?

Run 'vi /path/to/file/name', where 'name' is whatever you want the script to be called. Then edit the file like you would any other. Once you're done writing the script, close vi (don't forget to save the file on your way out! entering ':wq' does this). In order to be able to run your script, run 'chmod +x /path/to/file/name'.


What file extensions are used to identify command shell scripts?

For windows, you might use .cmd, .bat as common file extensions. Unix doesn't use file extensions as associations, so no file extension needs to be used in the Unix environment. A shell script in Unix is simply a text file with any name that is readable and executable. However, file extensions are typically used in Unix as a documentation aid that states that the file is a shell script. Common extensions are .sh, .csh, .ksh, .tcsh, .zsh, etc.


Which command in unix is used to run the script immediately?

As long as the script file is readable and executable, just type the name of the script and it will execute immediately. Otherwise, you can call the shell interpreter and have it run it immediately such as: bash ./thefile where ./thefile is the script you want to run. Or, substitute the shell interpreter you wish to use instead of bash, such as sh, ksh, tcsh, csh, etc.


Write a shell script to accept file name from the user and confirm whether it is a file a directory?

echo -n "Name: "read nif [ -f $n ]; thenecho $n is a fileelseif [ -d $n ]; thenecho $n is a directoryfi


How do you compile and run shell script of factorial?

Shell scripts are not compiled; they are interpreted (and therefore do not need to be compiled). Just type in the name of the shell script and any parameters it needs to execute.


What is script file?

Do you mean script file loaded in an HTML document, via the <SCRIPT src=filename> tag? If so, define one or more functions within that file, and pass parameters to the function[s]. Or do you mean client-side stand-alone scripts, executed by the script host? If so, pass arguments on the command line, after the script name, and access them within the script using the WScript.Arguments object.


Write a shell script to display the smallest file name in respect of the string length among the list of files available in the current directory?

ls-lS | tail-1


Write a shell program using if-the-else to test whether a variable name is a directory or a file?

see : Write_a_shell_program_using_the_if-the-else_to_test_whether_a_variable_name_is_a_directory_or_a_file