In UNIX， how would I execute all commands which has already been writen from file?
819090
depends on your shell...\nin tcsh: source filename\nin bash: . filename\n\n... and i don't know what "by optional" means sorry
1025321
This should work\n% sh\nsh-2.05b$ a=`ls`\nsh-2.05b$ echo $a\na.c a.out bin conf data env sql src templates upgrade\n\nPutting a command (like ls) in backticks and assigning the same to a variable (like a) lets you store output in a variable for a shell script
217589
I tried this myself after reading your question\nno the file will not be created again and the prosses will work normally as if the program is exist\n\nto try this your self you press CTRL+ALT+F1\ncat /dev/mouse > ~/test\n\nnow without moving your mouse press CTRL+ ALT+F2\nnano (or vim) ~/test\n(file is empty) move your mouse and try a again\nnano ~/test\nfile is filled with meaningless characters\nnow try this \nrm ~/test\n(move your mouse)\nls ~\n(the file will not be listed)\nPress CTRL+ALT+F1\nthe command is still working with no problems\n\nhave a fun
680504
/*\nOriginal Question:\nI am writing a C program in Solaris environment...if i\nwant to execute some system command i can do it using\nsystem("string to be executed")....but it accepts string\nonly. what if i want to pass some variables to system at\nrun time....suppose i was to use this commands at runtime\n"cat file1 file2 >file3"....how i wud pass the file names?\nany suggestions !  thnx in advance Amardeep Sidhu\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n\nint\nmain(int argc, char* argv[])\n{\n\n  /* First, get some values into variables */\n\n  char *str1 = "ls";\n  char *str2 = "-l";\n  char *str3 = "/tmp";\n\n  /* One common trick to using "system()" is */\n  /* to "sprintf()" the arguments into a buffer */\n  {\n    char buffer[100];\n    sprintf(buffer, "%s %s %s", str1, str2, str3);\n    system(buffer);\n  }\n\n  return 0;\n}
237482
Right click on the file and select Print.\n\nIn DOS, COPY [filename.ext] LPT1:
971846
Use the Contractible Header script from Dynamic Drive to EASILY do this.  See source for URL.\n\nGood Luck!
605506
Start > run >type cmd\nC:&#92;>net\nThe syntax of this command is:\n\n\nNET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]\n\n\nEXPLANATION\n\nThe NET SEND command no longer sends files.\n\nACTION\n\nType the message you wish to send on the same line as NET SEND.
820059
If you know anything about writing scripts, you can write a batch file that will pull and execute all of the updates and reboot at the end.  You can probably even do a google search and find one someone else has written and just change the file tags.
358685
I found how to create a folder or file named CON , LPT1 , COM1 etc...\n\nSTEP1: goto command prompt\n\nSTEP2: type in prompt e:&#92;> "mkdir &#92;&#92;.&#92;e:&#92;con"\n\nSTEP3: verify by typing "dir &#92;&#92;.&#92;e:&#92;con"\n\nSTEP4: delete the file or folder "rmdir &#92;&#92;.&#92;e:&#92;con"
47547
Go to the Dos prompt. There is a program called sort.\n\nSort [unsorted file name] > [sorted file name]\n\nIf you want to concatenate all your files together first, that's a bit more tricky:\n\nCopy [file name 1] ABC.Txt\nType [file name 2] >> ABC.Txt\nType [file name 3] >> ABC.Txt\n.\n.\nSort ABC.Txt > ABC.Srt
563963
Just use cmd when you go to start-run and it will bring up the command prompt\n\nThen you can run your commands.
585951
not in a batch file but you can use basic to do it. You should be able to find BASIC on your xP  CD
146916
Depends on your compiler and operating system. However, you can probably use the system() call from the C library (you can call that from a C++ program) or one of the exec functions. These exist on most Windows compilers and Linux/Unix too.\n\nhttp://www.gnu.org/software/libc/manual/html_node/Executing-a-File.html\n\nhttp://www.gnu.org/software/libc/manual/html_node/Running-a-Command.html#Running-a-Command\n\nNote that if you are not using gcc, your versions may be a little different than these.
1055879
Start-run then type in either "cmd" or "command" (without the quotes).
201959
if u have linux..\nat command prompt press tab twice\nit will give u a list\nfor "how to" use it try:\n\nman [command]\n\nchange [command] with your command, it will give u a brief manual
106533
any.bat >output.txt 2>errors.txt\n\n(that would send the main stream output to 'output.txt' and if errors occur, reports will be sent to 'errors.txt')
409689
Keep track of the previous location in the file with the VB equivalent of 'ftell' and 'fseek' to that location. Can't tell you how cause I don't use VB.