Programming :: Make Delays Between Multiple Commands In An Alias (ircII)?
Sep 21, 2010Okay so I have an alias that looks like this:
Code:
ALIAS sorigin {
MSG sorigin Test1
[code]...
Okay so I have an alias that looks like this:
Code:
ALIAS sorigin {
MSG sorigin Test1
[code]...
Newbie question here. I just realized that I can tell make to use multiple cores to compile by doing PHP Code:makewhich is just awesome on a quad core with hyperthreading (I just compiled 2.6.33-rc5 in under 5 minutes!) I know aliases are possible, though I've never had much need. What I would like to know now, is if it would be safe to alias make to mean PHP Code:so that by default I use 6 of the procesors when building or if there would be occasions that compiling on multiple processors would be a bad thing
View 10 Replies View RelatedI am curious of how to make a GUI interface that uses multiple programs and commands. I have found wxwidgets as the most likely candidate for making my own interface.Is this the best programming language for a beginner?
View 3 Replies View RelatedI need to occasionally touch a file with the current timestamp as the filename. I would do so this way:
touch `date "+%Y-%m-%d_%H-%M"`.txt
However, I'd like to define an alias for this. When I try adding to the bashrc this:
alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"
the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...
How can I get the command to expand only when I call the alias? Or must I use a function for this?
(i) I usually make multiple dir using -p optionex: mkdir -p dicttest/audrep/tdriver/testNow after creating this dir's i stay in current dir instead i want to go directly to test dir how can i acheive this.(ii) When i execute which command as followswhich testerm i will get the location of testterm now i want to open this filewhen i did in this wayhich testterm | vi The file dosent get opened how can i acheive this ?ex:
linuxx86:110$ which testterm
/view/rdl110_linuxx86/vobs_usrrdl/sc/testterm
linuxx86:110$ which testterm| vi
[code]....
I have been working on a project for a while now that involves a rather complex daemon that has to be simultaneously running different tasks. For example one of these tasks is to receive IP packets from the Netfilter queue and place those packets into one of several internal queues. While other tasks involve taking IP packets from those internal queues and processing/manipulating them and finally returning them back to the Linux network stack.
As I as I have no previous C experience before starting this project I just spawned a new thread each time I needed the daemon to be doing something else while those other tasks continued to run. Is there any other way of doing this or is this pretty much the only way of doing this? Because C is procedural I could not figure out any other way of doing accomplishing what I wanted. Should I have done it some other way or is this the correct and only way I could have gotten my C app to be running multiple tasks at the same time?
I have a problem in making multiple calls using PJSIP. I registered different accounts that implements IAccount and added that in the CallManager. When i try to make the calls from the same CallManager, I could able to make the first call. When second call is made the first call got cut and it is alerting and the same for the thrid call..Could anyone help me in this regard.
Note: Calls has to be made from different numbers to different destinations. Is it possible to make multiple outbound calls simultaneously from the same instance of CallManager?
Is it possible to make an AWK script that goes over the file multiple times, every time doing something different to it?
View 19 Replies View RelatedI want an alias to move ~/.sportstracker to ~/Documents/Software/SportsTracker_4.1.1 and then zip it and name the zip file like this SportsTrackerBackup_yyyy-mm-dd (example: SportsTrackerBackup_2010-03-08)Note: I don't mind how the archive is compressed, 7z, rar, zip, tar, etc. Although the higher the compression the better
View 9 Replies View Relateddifference between make and make bzImage commands as both are used to build source code.
View 1 Replies View RelatedI have problem to use an alias that defined in ksh93 script,in the functions in the same script onm Linux.I definied an alias in main: alias echo='echo -e' in order that echo will read backslashes but when i executed it in function, the alias didnt work, and performewd a regular echo, without -e
cat test.ksh
#!/bin/ksh
alias echo='echo -e'
checkUsage
[code]....
I want to create an alias or function that when used prints something like this on the command line so I can further modify it before pressing enter myself.
Code:
$ FILE=exercise1; cc -o $FILE $FILE.c && ./$FILE; FILE=
The idea is that I'm studying c and want to change the name of the file once instead of
[code]....
I am trying to execute executable files in bash without adding ./ I know there must be an alias to add in .bashrc, that must be something like alias PATH=$PATH:. But this seems not to be working.
View 1 Replies View Relatedalias and shopt won't work in script
[Code]....
I am in the process of coverting some video files to motion jpeg (Wii) files with ffmpeg (great program by the way). I have been successful and so the majority of my work is over. My question is simple (I think) but complex to me so... here it goes. Is there a way on one command line to "batch" convert 8 or 9 files together instead of one by one. I just don't know what to put on the command line. I took one UNIX class a long time ago and the terms pipe and such come to mind... but I forget. Any takers? That was I can write what I want the computer to do in the morning and just come back after work and voila...
View 6 Replies View RelatedI'd like to convert some of my backed up ripped DVDs to an .avi with separate subtitle file. I have been looking at MEncoder but I can't get my head around the commands or how multiple .VOB files become a singular .avi file.
View 2 Replies View RelatedI'm trying to run multiple commands on things I have found, how can I achieve this? find . -exec cmd1; cmd2 does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.
View 2 Replies View RelatedI created a application launcher (type:terminal) to replace the index.php on my apache server (/var/www/) with the index I keep updated on my desktop.
This is the exact script I'm using on the launcher:
My idea was the launcher would delete the current file at /var/www/, and then copy the file on /home/andre/Desktop.
But its not behaving properly, it is deleting both the file in my /var/www/ AND my desktop.
With xterm, I can do the following, and the scripts are executed sequentially in a single xterm: xterm -e 'script1.sh;script2.sh' But with gnome-terminal, when I do: gnome-terminal -e script1.sh;script2.sh It runs them in parallel in 2 different terminals. I've tried a few combinations of ", and ', around the scrips, but no difference.
View 2 Replies View RelatedI am using putty to connect to some servers. Is there a program that let you connect to say three servers and when you write your commands to server1, server2 & 3 also gets the command? So I don't have to log in to all three servers to do the exact same thing.
View 2 Replies View RelatedI want to make a file called file roller for Ubuntu 9.10. The folder has a file called install.sh and some others that are make.
I figure first I need to make a file and then run install.sh to install. But I don't know how to do this.
I am trying to get 2 things to operate on the same line, for example echo Current Version: [cat /file/ver.txt] is there a way to do this?
View 1 Replies View RelatedI like background commands in scripts:
Code: sudo apt-get update& I also like multiple commands in scripts:
Code: sudo apt-get update && sudo apt-get upgrade
How would I combine these? Could I do it with functions?
Searched the forums for solution & am not seeing oneWrote a simple script to find Trash folders on Lucid and delete them
Code:
#!/bin/bash
sudo find / -regex ".*Trash[-]?[0-9]+?" | while read -e line
[code]....
I'm trying to write a bash script that will simultaneously ping a host and execute a traceroute at the same time. I would like the results to output to a text file.
View 6 Replies View Relatedso I am trying to make a launcher under application/Games menu for OpenBVE. In this launcher I need it to run 2 commands in the terminal:
Code:
cd /home/username/OpenBVE
and
Code:
mono OpenBve.exe
[Code]....
In a script I am writing I am trying to add logic so that the script can figure out if a remote server uses rpm or dpkg and then run the appropriate command to print a list of installed packages. This works locally, but I need to get it to work through SSH and I have no idea how to do that. The relevant portion of the script is below. It would also be nice to find a way to not need the full path to the executables but I'm not real concerned about that.So anyone know how to make this code work via SSH?
Code:
if [ -x /usr/bin/dpkg ]; then
dpkg --get-selections
[code]...
I have several commands in a bash script, and in the middle of the script there are several commands whose output and error streams I want to redirect to a file. I think I could simply add '>> myfile.txt' to the end of every command, but is there a way to set it before that block of commands, then reset the streams to their original state at the end of that block?
View 1 Replies View RelatedI want to do something like svn add dir1 dir2; svn ci dir1 dir2 but have it be only 1 revision. Is there a way to do this? Is this the correct way to add new folders (with contents) to the repository? We are restructuring the trunk, so I cleared it out and plan on putting these directories with their contents in it.
View 1 Replies View RelatedIs there any easy way to Make a GUI for terminal commands?
View 2 Replies View Related