How do I select the line in bash terminal
Is it possible to select part of a string in the bash terminal and delete it at once, rather than navigating to a point in the command and backspacing it all?? thanks! ...
Is it possible to select part of a string in the bash terminal and delete it at once, rather than navigating to a point in the command and backspacing it all?? thanks! ...
I run my own script to dump databases into files on a nightly basis. I wanted to count time (in seconds) it takes to dump each database, so I was trying to write some functions to help me achieve it, but I'm running into problems. I am no expert in scripting in bash, so if I'm doing it plain wrong, just say so and ideally suggest altern...
I want an alias that produce folowing result: $cd /home/ok [clear screen] /home/ok total 452K -rwx--x--x 1 user gigl 16K Oct 1 14:08 ok0 drwx------ 5 user gigl 0 Oct 1 14:02 ok1 drwx------ 5 user gigl 0 Oct 1 13:59 ok2 drwx------ 9 user gigl 0 Oct 1 14:01 ok3 -rw------- 1 user gigl 32 Sep 30 14:36 ok4 I did a script l...
I recently decided to try to learn some bash scripting and as a fun exercise I decided to make a script to open up a daily file for me to write notes in whenever the script is run. It worked fine until I logged out and back in to the system later, when I received an error /usr/local/bin/notes: line 45: /home/MY_USERNAME/notes/2010-10-0...
Hello, would like to add new functionality to the bash shell. I need to have a queue for executions. What is the easy way to add new functionality to the bash shell keeping all native functions? I would like to process the command line, then let the bash to execute them. For users it should be transparent. Thanks Arman EDIT I just ...
I've got a file which is like this: 3 EOE 5 APPLE 6 NOBODY i need to parse this and output all with '3' in the first column into filename.3, '4' into filename.4, etc... from the unix prompt ...
is it possible to write a bash script that can read in each line from a file and generate permutations for each? Using awk / perl is fine. File ---- ab abc Output ------ ab ba abc acb bac bca cab cba ...
Hi, How can I iterate through all the local branches in my repository using bash script. I need to iterate and check is there any difference between the branch and some remote branches. Ex for branch in $(git branch); do git log --oneline $branch ^remotes/origin/master; done I need to do something like given above, but the issue...
Basically I want to use Quicktime to convert an audio file from AAC to AC3, I thought I might be able to use Quicktime? But I can't seem to be able to find the CLI command for it. ...
I've been following a tutorial from a recent edition of the Linux Journal which teaches how to internationalize Bash scripts. However, I'm having trouble getting it to work on my system (Ubuntu 10.04.) When I get to the part where I'm supposed to call "gettext," after setting the environment variable TEXTDOMAINDIR, I get: toby@toby-lapt...
i have the following case :- i write bash file bbb in windows 2003 and but a return value = 3 by exit /b 3 then i execute this bash file from unix by this command :- ssh -l admin host 'cmd /c start c:\bbb' but when i print the return value i get ( 0 ) not ( 3 ) i print this value by `echo $? ' now how i can get a return value "exit cod...
While executing a shell script involving database connection, my script showed me an Error :sqlplus not found : sqlplus -s username/paswd@DB_name > /home/user/sql.out << EOF But when i included the following statement, it started to work: source ~oracle/.bash_profile What is the purpose of this above line ? ...
At my school I want to automate the process of telling the students to go to class and play a song five minutes before class starts at the end of lunch. I wrote a Bash script that will play the announcement, a random song. After five minutes the script will fade out the music and kill VLC. I need this script run on Windows as the is the...
I have a for loop that I pass through ssh to a server that is formatted to look kind of like this... i=0 for cmd in cmd_list; do ${cmd} | sed "s/^/OUTPUT_${i}_: /" & (( i++ )); done; wait The idea is that the for loop will run a list of commands that I give it and pipe each one to sed where sed prepends each line of output with a comm...
Is there a Thor equivalent (ruby tool) or similar scripting framework for Javascript that could be used to build scripts? ...
I have a python script called mythicalPythonBindings.py. It outputs something like Establishing database connection chanid = 1952 starttime = 2010-09-29 08:12:00 endtime = 2010-09-29 08:30:00 basename = 1952_20100929081200.mpg stars = 0.0 I need to read this information into variables of the same name in a bash script. My bash scri...
Hey guys, I tried to make an alias for committing several different git projects. I tried something like cat projectPaths | \ xargs -I project git --git-dir=project/.git --work-tree=project commit -a where projectPaths is a file containing the paths to all the projects I want to commit. This seems to work for the most part, firing...
how i can pass a file directory (path) as parameter to 1. batch file in windows operating system 2. bash file in unix oprating system ...
I've searched for a while but i can't either find an answer or come up with a solution of my own, so I turn to you guys. First question I actually ask here :) I would like to run several instances of the same program, and redirect each of these programs' standard output to a file that contains that same process' pid, something like: my...
I've searched for a while but i can't either find an answer or come up with a solution of my own, so I turn to you guys. First question I actually ask here :) I would like to run several instances of the same program, and redirect each of these programs' standard output to a file that contains that same process' pid, something like: my...