Your interaction with Linux Bash shell will become very pleasant, if you use PS1, PS2, PS3, PS4, and PROMPT_COMMAND effectively. PS stands for prompt statement. This article will give you a jumpstart on the Linux command prompt environment variables using simple examples.
PCSX2 can be easily installed on any Windows versions by using its documentation. John Corpuz of Tom's Guide mentioned PCSX2 in his Best PlayStation Emulators for PCs article, saying, 'When it comes to stable, playable Playstation 2 emulation, PCSX2 is pretty much the best game in town at the moment.'
1. PS1 – Default interaction prompt
Some great features of the PS2 games ISO file free download is that aside the fact that you no longer need a console to play PS2 games, you also get Custom resolutions and texture filtering to make your old PS2 games look better than their HD remakes, unlimited memory cards, save states, enabling you to quick save and load practically anywhere in your game, use any controller (PS3,Xbox 360 etc. Get the Swap Magic 3.6 software suite. Swap Magic 3.6 is software that allows you to play copied PlayStation 2 (PS2) games on a regular PS2 or a Slimline without having to install a modchip. Swap Magic is commonly found at independent gaming or computer repair shops.
The default interactive prompt on your Linux can be modified as shown below to something useful and informative. In the following example, the default PS1 was “s-v$”, which displays the shell name and the version number. Let us change this default behavior to display the username, hostname and current working directory name as shown below.
Following PS1 codes are used in this example:
u – Username
h – Hostname
w – Full pathname of current directory. Please note that when you are in the home directory, this will display only ~ as shown above
Note that there is a space at the end in the value of PS1. Personally, I prefer a space at the end of the prompt for better readability.
Make this setting permanent by adding export PS1=”u@h w> ” to either .bash_profile (or) .bashrc as shown below.
In the next post, I’ll write about several practical examples of PS1 usage in detail.
2. PS2 – Continuation interactive prompt
A very long unix command can be broken down to multiple line by giving at the end of the line. The default interactive prompt for a multi-line command is “> “. Let us change this default behavior to display “continue->” by using PS2 environment variable as shown below.
I found it very helpful and easy to read, when I break my long commands into multiple lines using . I have also seen others who don’t like to break-up long commands. What is your preference? Do you like breaking up long commands into multiple lines?
3. PS3 – Prompt used by “select” inside shell script
You can define a custom prompt for the select loop inside a shell script, using the PS3 environment variable, as explained below.
Shell script and output WITHOUT PS3:
Shell script and output WITH PS3:
4. PS4 – Used by “set -x” to prefix tracing output
The PS4 shell variable defines the prompt that gets displayed, when you execute a shell script in debug mode as shown below.
Shell script and output WITHOUT PS4:
Shell script and output WITH PS4: The PS4 defined below in the ps4.sh has the following two codes:
$0 – indicates the name of script
$LINENO – displays the current line number within the script
5. PROMPT_COMMAND
Bash shell executes the content of the PROMPT_COMMAND just before displaying the PS1 variable.
If you want to display the value of PROMPT_COMMAND in the same line as the PS1, use the echo -n as shown below.
If you liked this article, please bookmark it on del.icio.us and Stumble using the link provided below, under ‘What Next?’ section.
> Add your comment
If you enjoyed this article, you might also like..
Next post: Bash Shell PS1: 10 Examples to Make Your Linux Prompt like Angelina Jolie
Previous post: How To Repair Corrupted MySQL Tables Using myisamchk
I’ve had a couple requests to compile a list of all the Dreamcast games that have appeared on other console and the PC and Mac as well.
While this list may not be exhaustive, it includes just about every worthwhile game Dreamcast including imports. The list is alphabetical and the other systems each game appears on is noted after the title.
Games that have the PS1 or N64 are usually ported from those older systems and received a higher-quality port on the the Dreamcast. Games ported to the Playstation 2, Gamecube, or XBox are usually of equal quality or received minor upgrades on the newer systems.
Copy Games On Ps2 Using Dumb For Macbook Pro
If you have any correction or additions, please let me know in the comments section below.
Copy Games On Ps2 Using Dumb For Macbook
4×4 Evolution – PS2, PC
18 Wheeler American Pro Trucker – PS2, Gamecube
102 Dalmatians Puppies to the Rescue – PS1, PC
Aqua GT – PS1
Alone in the Dark: The New Nightmare – PS1, PS2, PC
Army Men: Sarge’s Heroes – PS1, N64, PC
Atari Anniversary Edition – PS1
Baldr Force EXE – PC
Bangai-O – N64
Bang! Gunship Elite – PC
Capcom vs. SNK: Millennium Fight 2000/2000 Pro – PS1