General :: Open Command With Pipeline?
Apr 9, 2011What is the effect of pipe symbol in the second statement shown below? How does it differ from first one?
set nt [open "file" "r"]
set nt [open "|file" "r"]
What is the effect of pipe symbol in the second statement shown below? How does it differ from first one?
set nt [open "file" "r"]
set nt [open "|file" "r"]
Was trying to write a shell script that has if conditional statements to decide different arguments for a command.Basically:
Code:
if [ "$1" = 1 ]
then
[code]...
Suppose that there are two files
Code:
$ cat abc1
a1 a2
[code]...
I am searching for a file in a specific folder using the following command and storing it in a log file
find . -maxdepth 2 -type f -name "components.xml" -print | while read obj
do
basename `dirname $obj` >> avail_list.log
done
Here I want to do the following
1. Store each entry after processing in an array variable.
2. Use this array variables as arguments to function calls.
Here my primary objective is to store the entries from 'find' command in an array. So it is ok for me if I am not creating the log file.
I have installed opensuse 11.6 in my TOSHIBA (Satellite) laptop. Currently I have problem with keyboard . When I type pipeline key [SHIFT+|] it gives ~(tilda) character instead of |.
View 4 Replies View RelatedAfter contracting malware on Vista i decided to switch over to Linux and chose to start of with Ubuntu because of the graphical interface. that being said, you have no doubt inferred that i have no coding experience. basically i was hoping to find some nice tutorials and sites for Ubuntu. Also, i did downloaded the suggested programs and patches but im still experiencing problems with Adobe,flash, and and opening .exe files. for the latter, when i click on .exe files it is equivalent of using explorer on windows so i was wondering how to use the command prompt to open them. supposedly linux is susceptible to malware so if you could please suggest a anti -malware program.
View 14 Replies View RelatedEvery time I need to find a file and then open it, I have to use :
find ./ -name **.properties. , then copy the result, and then vi "paste the result here" .
If I need to use a mouse, it can be a little trouble. So is there any better way to do this?
I install Vmware in winxp sp3, then install centos 5.5-i386 release 2 in Vmware. I want to type some command like yum install ..., but where to open system command? I searched the menu applications places system on the top of the desktop, but I am not sure which one is.
View 2 Replies View RelatedWhat UNIX command do you use to find out the open ports in a system?
View 1 Replies View RelatedAre there a command to open up a new tab in gnome terminal(Ctrl+T outcome). I need it to use with in bash script.
View 2 Replies View RelatedWhat is the command to check all open TCP connections?
View 7 Replies View RelatedYesterday I installed OpenOffice on my Linux server. But when I go to run it through the command line, it says command cannot be found. I've also tried other things like OOWriter, etc. Has anyone had this problem? Installation process went like below: root@aserver [OOO330_m20_native_packed-1_en-US.9567/RPMS]#
rpm -i *.rpm
package openoffice.org-ure-1.7.0-9567.i586 is already installed
package ooobasis3.3-core01-3.3.0-9567.i586 is already installed
package ooobasis3.3-en-US-3.3.0-9567.i586 is already installed
package ooobasis3.3-core02-3.3.0-9567.i586 is already installed
[Code]...
On my ubuntu 9.10 pc i am not running a GUI.
Every thing is run from command line.
How do i start a second telnet session from command line.
Plus can i have 4 telnet session open and move from one to the next and back again.
How can I open a folder in a window from the command line. I don't want to list the contents of the folder by the "ls" command, but want to open the folder through the command line, like it opens when we double click on the folder.
View 12 Replies View RelatedIs there any open source, command line, subtitle converter, prefferably for linux?
View 2 Replies View RelatedI am trying to write a very simple script that will go to every subdirectory of a single directory and run a command (lets call it make_ndx).I know I can write this the long way with in a text document with something like:
cd /"the directory"/"the 1st subdirectory"
make_ndx
cd ..
cd "the 2nd subdirectory"
cd ..
Alternatively, I also tried: for i in 'find /path/somemorepath -type d -mindepth 1'; do cd $i; make_ndx -f *.gro; done which returns me with the error cd: find: no such file or directory. But if I run the find command by itself to test if I am calling the right directories, it gives me the exactly the output I am looking for. Any ideas? Should I just write the find results to a file and loop through the contents of the file (which seems a little bit like overkill) or am I just making a simple typographical mistake and I am just not seeing it?
I have a problem that I can't seem to figure out. I can easily create a .sh file that will execute a command in Terminal, but as soon as it executes the terminal disappears. How do I get it to stay? My idea is to have the keyboard shortcut "ctrl+alt+del" open a .sh file with the contents "ps ax". Then it would be just like having a task manager; the terminal would open with "ps ax" already executed, and all I would have to do is kill the process number.
View 5 Replies View RelatedIn Xubuntu 9.04 I could right click in any directory folder and have the option of opening a terminal window "there". So the terminal command line would open preloaded to that directory. I know, I'm lazy, but it sure made life (and command line work) easier. But it's not available in my new install of Ubuntu 10.04. Now, I know that my gui environment has changed from xfce to gnome, but I would have expected MORE features, not less.
View 9 Replies View RelatedI have Lenny PPC installed on my Apple G5 and am using a Danish PC keyboard, so that all the keys follow standard Debian configuration. The only problem is that I can't figure out how to open the CD drive to put a CD in. If I already had a CD in the drive, I could always right-click to eject, but that isn't the case.
View 2 Replies View Relateding Fedora 15 x86 with gnome 3.Here is the problem with "open with" menu.I cant indicate custom command. here is screenshot:
View 3 Replies View Relatedis it possible to open a file with a terminal without specifying the application it will use ? In fact I mean what is the equivalent of the double click on the file manager for a terminal.
View 9 Replies View Relatedim trying to set mp4 files to open with avidemux but its not listed in the "add applications" list, but at the bottom it says "add custom command" and theres a browse button but i have no idea what im looking for.
is there an easier way to add a program thats not in the list, via terminal codes?
or what exact file should i be looking for if i use the browse feature?
im using Ubuntu 8.04
I recently managed to compile and install audacious 2.4.0 successfully. I prefer to browse my music folders and double click on the song I wish to play rather than use "open files" within audacious. It works fine to open the first mp3 but when I click to play another song instead of stopping the first one, it opens another instance of audacious and now both songs are playing. When I go into the properties of an mp3 and select open with > "other application" > audacious then click "Use a custom command" the following is in the box /usr/local/bin/audacious %f. is there any custom command I could use so that when I click another song audacious stops the currently playing song and plays the new one, without opening another instance?
View 2 Replies View RelatedI want to open another terminal from typing a command to one terminal.
can anyone tell me a command for this..
I am trying to use a command to open a partition or disc from the top like open up external drive, and not have to be externaldrive/videos or whatever. The reason being is to use in cairo dock, I have tried to drag n drop like i am able to with regular folders, but no good. I seen the option to run a command, and figured I would try it that way.
I have the partitions and discs i want to access mounted. they are:
External Drive (/dev/sdc1)
Storage (/dev/sdb1)
Windows (/dev/sda2)
I tried to open them in terminal, /media/storage: no such file or directory;
/dev/sdc1: Permission denied;
open /media/storage or /dev/sdc1
Couldn't get a file descriptor referring to the console;
se7en@PC:~$ nautilus /media/storage or nautilus /dev/sdc1 .....
Along with a pop-up saying 'the location is not a folder'.
I have a small board that has a static ram board attached to it. I have two different programs that each write to a byte of memory in the static ram board. I get a file descriptor to the device memory with the following code:
int phymemfd;
phymemfd=open("dev/mem, O_RDWR | O_SYNC);
This opens the physical memory for both reading and writing. Next I get a pointer to the beginning of my ram board.
volatile unsigned char *novram;
novram = (unsigned char *) mmap(0, getpagesize() * 31,
PROT_READ|PROT_WRITE, MAP_SHARED, phymemfd, 0x11AA0000);
I do this same code in two processes that are both running and this works fine. Now, if I take out the O_SYNC parameter, one of the programs gets into some sort of weird state.My understanding of the O_SYNC parameter is that it cause the process accessing the memory location to block, not allow another process to run, until the first process has finished writing to it.I can see that if my program doesn't block, I wouldn't really know what was in the memory location, but would I can't see how it would cause any other type of system problem.
I come from ubuntu were ifconfig is used to check my ip address and nic cards on my computer. I have openSuSE 11.2 on acer aspire 5515.
When I run the command I get:
So what command do I use in place of ifconfig.
I just switch to fedora from windows recently. And I love the terminal of fedora alot. The problem is when I run some command on the terminal, I need to wait for that command to finish before executing another command. This is very inconvinient, say If I open eclipse using the terminal, this eclipse program will hog to the terminal until I closed it. So if I want to use terminal again I have to open another one.Hence the question is: Is there any way open multi processes(command) using only one terminal?
View 4 Replies View RelatedPreviously I was able to open any document I wanted in the CLI by typing:
Code:
open some_document.txt
Now when I try to do this I get the following:
[code]...
I have the following rsync command for making some backups:
Code:
rsync -r --progress --delete -H --numeric-ids -a --exclude=.gvfs /source /media/Backup
If I paste that in my Terminal, it will perform a backup of all the files and show me what's going on in the Terminal window. But how can I make that into a launcher? I have made a launcher on my desktop with that code in its Properties, but double-clicking it starts the rsync process (I can see HDD activity) but a Terminal window won't open.