Save time at the command line with shell aliases and functions


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements UNIX and Linux RSS News Save time at the command line with shell aliases and functions
# 1  
Old 09-16-2008
Save time at the command line with shell aliases and functions

09-16-2008 01:00 AM
Familiarity with command prompts and shell scripts is still necessary if you want to get the most from your GNU/Linux system, but the less time you spend doing that the better, right? Two powerful ways to minimize your time at the command line are shell aliases and functions.



Source...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Are aliases available in shell scripts?

I define aliases and save in rc file. what I see is that it isn't available in shell scripts. They are however available in interpretive or interactive sub-shell which I get when I give command bash For ex.: I define alias echo='echo -n' it's unavailable in shell scripts but sub-shells. (5 Replies)
Discussion started by: ravisingh
5 Replies

2. Shell Programming and Scripting

How to execute functions or initiate functions as command line parameters for below requirement?

I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line if then... (8 Replies)
Discussion started by: saku
8 Replies

3. Shell Programming and Scripting

"Time" command and save result in a file.txt

Hi, I'am using "time" to check execution time of some script. Is there any possibility to save time command result into a file ? (2 Replies)
Discussion started by: Physix
2 Replies

4. Shell Programming and Scripting

execution of aliases from shell script

Hi I have to execute the commands in .aliases file from a shell script I tried 1.giving the alias directly in shell script 2.Giving the actually "value of alias" in the shell script 3. I tried giving both steps 1 and 2 inside ` quotes Still nothing is working . It says command... (3 Replies)
Discussion started by: ssuresh1999
3 Replies

5. Shell Programming and Scripting

How to get the time cost of functions?

hi, There is a shell including many functions, when I run ksh -x/-v to see the call sequence, but how do I know which function cost more? Of course, use time CMD to get the scripts runnning time, while it can not tell me which cost more. Thanks very much. (1 Reply)
Discussion started by: a2156z
1 Replies

6. Shell Programming and Scripting

Accessing aliases within a shell script

I am not able to access the aliases in my environment within a Python script. If I pass the alias to os.system(), I get a message saying "sh: x: not found". I've tried sourcing my .bashrc file in the script, but this does not work. I would perfer not to source my or any rc file because this... (9 Replies)
Discussion started by: cooldude
9 Replies

7. Solaris

create command aliases for a user

Hi all, I am using Solaris 10 OS on X86. When I add a new user from command useradd -d /export/home/vikas -m -s /bin/bash vikas files local.cshrc, local.login, local.profile and .profile get copied to my home directory (i.e. /export/home/vikas) from /etc/skel/ Which file I have to change... (4 Replies)
Discussion started by: vikas027
4 Replies

8. Shell Programming and Scripting

Time out in shell script for a stament/line

Folks, In shell script, can I mention a timeout for a command execution, afterwhich I want to exit from that particular line and proceed furthur. I have part of my script as below: ****************************** cd $EXPECT_HOME expect custom_install.exp mv... (5 Replies)
Discussion started by: gvsreddy_539
5 Replies

9. Shell Programming and Scripting

passing command line parameters to functions - sh

All, I have a sh script of the following tune: function a () { #functionality.. } function b () { #functionnlity.. } function check () { # this function checks for env and if all fine call build } function usage () { #sh usage details } function build () { #calls either a or b or... (5 Replies)
Discussion started by: vino
5 Replies

10. Programming

time functions help?

Hello to anyone who can help me! I am in need of some help in procuring a more exact timing scheme in C for use with gcc. I manage to get a timing in seconds just fine using difftime(). However, I need more accurate.. milliseconds... no clue. Please help? Brian (2 Replies)
Discussion started by: bcowan
2 Replies
Login or Register to Ask a Question
platform::shell(3tcl)					       Tcl Bundled Packages					     platform::shell(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(3tcl)