Results 1 - 20 of about 33
Replacing Variables in Bash/shell
Replacing Variables in Bash/shell Intro: Expression:Defininition Intro: First of all make sure that you the variable is defined before...
Nov 20, 2009Operating Systems > Linux > Shell > Bash
Script to Search and Remove All Hidden Folders
Script to Search and Remove All Hidden Folders Issue Solution Note Issue I need a Script (VB or BAT : Prefferebly BAT Script) That will...
Nov  8, 2009Operating Systems > Linux > Shell > Scripts
Transforming columns into lines
Transforming columns into lines Example Limitations It is endemic for most Linux tools to work with lines, but not with columns (sed,...
Oct  1, 2009Operating Systems > Linux > Shell
Modifying a read-only variable
Modifying a read-only variable Solution 1 Solution 2 Solution 1 A variable declared as read-only can not be modified during outgoing...
Aug 13, 2009Operating Systems > Linux > Shell > Bash
Accessing to recent commands from the history
Accessing to recent commands from the history The Linux / Unix shell is full of features allowing you to save time and making your life...
Aug  7, 2009Operating Systems > Linux > Shell
Secretly enter a password within console
Secretly enter a password within console Here is a simple method on how to limit the use of a specific command (as to prevent the...
Aug  7, 2009Operating Systems > Linux > Shell > Bash
Recover result of command in a variable
Recover result of command in a variable For specific reason, it is necessary to recover the result of a command (or back code) in...
Aug  7, 2009Operating Systems > Linux > Shell > Bash
Creating an empty file
Creating an empty file To create an empty file, type the following command: > file You can also use the touch command: touch file
Aug  6, 2009Operating Systems > Linux > Shell > Bash
Changing password via a script
Changing password via a script Method 1: passwd Method 2: chpasswd Method 1: passwd Conventionally the command use to change password...
Aug  4, 2009Operating Systems > Linux > Shell > Bash
Closing session- Quick log out
Closing session- Quick log out The fastest way to log out from your session is to press CTRL+D to close the session. This short key is...
Jul 17, 2009Operating Systems > Linux > Shell > Bash
[Bash]Parameters
[Bash]Parameters Intro Example 1 Example 2 Initialize parameters Examples Example 3 Intro You can provide a script on the command line...
Jul 17, 2009Operating Systems > Linux > Shell > Bash
[Shell]Accessing last commands in history
[Shell]Accessing last commands in history The shell Linux/Unix provide several features saving time. Thus, it is possible to go back in...
Jul 17, 2009Operating Systems > Linux > Shell
Substitution
Substitution Basic Substitution Simple Global Targetted Conditioned Substitution Simplified Advanced Bloc Advanced The substitute...
May  8, 2009Operating Systems > Linux > Shell > Sed
Displaying a file in reverse
Displaying a file in reverse You all know the command "cat" which is used to display a file (or to concatenate several). From here, to...
Mar 31, 2009Operating Systems > Linux > Shell
[Shell] Retrieving your public IP
[Shell] Retrieving your public IP Implementation GET Lynx Sed For several reasons, we may need to recover its public IP address in a...
Mar  9, 2009Operating Systems > Linux > Shell
Capitalize the 1st letter of each word
Capitalize the 1st letter of each word Below are two ways to proceed: Method 1 sed-r 's /(^.|.) / \ U & / g' Method 2 sed 's / ^. \ |...
Feb 22, 2009Operating Systems > Linux > Shell > Sed
How to read a file line by line
How to read a file line by line Intro Tips Bonus Intro One of the most common errors of learning scripts bash on GNU / Linux is to read...
Feb 22, 2009Operating Systems > Linux > Shell > Bash
Tips and tricks
Tips and tricks Substitution Display Remove Miscellaneous Substitution Substitute "foo" with "bar" on each line Only the 1st occurrence...
Feb 22, 2009Operating Systems > Linux > Shell > Sed
[Sed] Delete one or more lines from a file
[Sed] Delete one or more lines from a file Removing one (or several) line (s) of a file Syntax: sed '{[/]<n>|<string>|<regex>[/]}d'...
Jan 12, 2009Operating Systems > Linux > Shell > Sed
Inserting a space between each letter
Inserting a space between each letter Insert a space between each letter. $ echo -e "hello life\nand hello to you" | sed 's/./& /g' h...
Jan 12, 2009Operating Systems > Linux > Shell > Sed
12