General :: Unable To Declare A Variable In Cygwin?
Jan 21, 2010
I recently installed Cygwin on my windows vista to practice on Linuxunix commands.I am unable to do a simple task of declaring variables on the command prompt I am trying:
$ vech=Bus
$ echo $vech
bash: vech : command not found
What am I missing? Do i need to add something to .bashrc? Also, I remember right click on the shell command gives the ability to copy or paste text from the shell. I am using Bash, how do I copy n paste text on shell window?
I installed C ygwin (full installation) on my PC with WinXP on it. Then I downloaded "SendIP" at: [URL].
/flin@JKPZV2X /cygdrive/d/software/sendip $ rpm -ivh sendip-2.5-1.i386.rpm error: Failed dependencies: libc.so.6 is needed by sendip-2.5-1 libc.so.6(GLIBC_2.0) is needed by sendip-2.5-1 libc.so.6(GLIBC_2.1) is needed by sendip-2.5-1 libc.so.6(GLIBC_2.1.3) is needed by sendip-2.5-1 libc.so.6(GLIBC_2.3) is needed by sendip-2.5-1 libdl.so.2 is needed by sendip-2.5-1 libdl.so.2(GLIBC_2.0) is needed by sendip-2.5-1 libdl.so.2(GLIBC_2.1) is needed by sendip-2.5-1 libm.so.6 is needed by sendip-2.5-1 flin@JKPZV2X /cygdrive/d/software/send/
I have a program that is completed under Linux, it requires library tidy, PCRE and libcurl, which could be found in Cygwin too.
I could compile my linux program through Cygwin and produce an EXE file, however it do require 'cygwin.dll' installed by the users.
I am wondering if I could have someway to produce out a stand-alone EXE file that could run independently from Cygwin ? ( I don't mind to combine that cygwin.dll and the EXE together for a larger EXE file).
I have a problem with a very big script I wrote in bash, and now I need to modulirize it in at least four smaller scripts. The problem is, that most of the variables I have will need to be shared by all scripts.
My question is: is there a way to declare global variables in bash? So that I can use and change them in any of the scripts and every change in the variable can be "seen" by the other scripts later.
I am trying to install Cygwin and then NS2.GCC is not recognized by NS2.gcc -v gives the appropriate output.I dont know whats wrong.Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specsgcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
I am supposed to create an environment variable with the PRINTER variable, which should resolve to the word sales. Would the command be like this?: env PRINTER - NAME=SALES (is this the command to create that variable with resolving the word sales to it?)
As one of our friends told, I have downloaded and installed the CYGWIN on my winows xp pc, to learn and practice linux commands.when the icon of it is double clicked, its screen as appearing as below:
System1@system ~ $ MY DOUBT IS :
I could make a directory with command like mkdir. But after that it is not allowing commands like touch, vi, vim etc.How i have to write data or a file in it. Still anything to do after installing CYGWIN.
I am using cygwinI am getting these errors when i compile sim_routing.cc program by this command../../bin/cxx sim_routing.ccg++ -Wall -o sim_routing sim_routing.cxxfollowing errors comes../../common/priority_q.h : In member function 'bool guardedQueue<ITEM>::Validate(Const char*);error : there are no argument to 'strcat' that depend on template parameter so a declaration of 'strcat' must be avaible.error : <if you use -fpermissive g++ will accept your code but allowing use of undeclared name is deprecated>error : there are no argument to strcat that depends on template parameter,so declaration to strcat must be avaible
I want to use the command more to see the content of a text file; however, the command is not available. I wonder whether all linux commands exist in cygwin. I am running cygwin on windows xp.
New to this kernel stuff But not too new to C/C++. I'm trying to compile the linux kernel on a PC, that is running Windows XP 32 bit, using Cygwin. I keep getting the error saying:
I installed the CUnit framework which is a .tar.gz file from the bash shell in cygwin.
make gives me an error saying:
make install works make clean works
I am not able to compile but install works I do not know if it is installed and as to where it is installed
when i checked it gives me a list of header files and also the lib files. I do not know as to why the make command is not working in cygwin. When i go to the bin directory it shows the make command.
I want to declare an array with fixed size and initialize all the elements to zero. i want all elements of x to be zero and i dont know how to specify the size of array. also i have problem in comparing values in loops. my script is as follows:
i=0 let k=0 declare -a x for U in ${S[@]} do for (( T=1276082023 ; $T -le 1276082139 ; (( T++ )) ))
I have the binaries: perl-5.10.1-3.tar.bz2 and I don't have access (admin privileges) to run setup.exe for cygwin, my question is how can I install manually inside cygwin the module for perl: perl-5.10.1-3.tar.bz2?(or maybe can I get the sources and compile? can someone tell me please how?)
But I just downloaded cygwin to my xp machine. Tried my first experimental script and created it one level directly below where cygwin put me by default. The script, named show two says:
#!/bin/bash echo $1 echo $2
But bash apparently can't find it. The name of the script is showtwo, but I also tried naming it showtwo.sh; no dice.
I'm interested in modding an open-source turn based game called Advanced Strategic Command or ASC, but to do that I need bunch of libraries. Installing those libraries is very easy in linux, I know but the thing is I'm working with windows in which the building of the libraries is a bit more complex, as you probably know. One of those libraries is the ligsigc++, I'm using VC++ but haven't been successful in building the libsigc++ in VC++. I considered making my life easier with Cygwin (a unix shell for windows) and simply executing ./Configure, Make. I's worked like a charm and the library dll it produced is named cygsigc-2.0-0.dll which made me wonder is compiling a library in cygwin to be linked with VC++ perfectly ok? That is is there any difference in compiling in cygwin and VC++?
I have installed cygwin to my windows xp machine. I typed the commmand in cygwin shell it shows "command not found". How can i install make command in cygwin
Based on previous forum discussions, I tried to install cygwin with 'make' installed from develop during installation. I can even see 'make.exe' in bin folder, but still while running the make command, it still shows error.
I was confused in one other part. Should I put the bin folder in some specific location or just wherever it is placed during cygwin installation? I was running VIC model, do I need to place the bin folder inside VIC source code folder.
I am very new to Linux. I want to work on GTK. As I came from VB background, I want to use Anjuta IDE to start my design. I installed CYGWIN. When I am trying to install anjuta , I am getting error saying GLIB and Unique1.0 not found :
I'm hoping that someone can help me, I need to remove spaces (not replace with underscores) from several thousand files on a system with cygwin. Can I do this from the shell using rename or mv somehow?
I am running programs remotely but they are terribly slow. I'm on a windows machine which may be my first problem. I have killer ping and download speed so they should run fine. What can I do to resolve this.
I installed cygwin with rsync on a Win XP Machine. My goal is to backup a folder from one hard drive to another (both on XP machine).
I run the following command from a batch file:
Works fine except the --delete flag is not working. Copies everything in source to destination, but doesn't delete some extra files that are present on the destination, but aren't on the source, which it's supposed to. I looked at the rsync man page, and I'm doing everything right... such as not using wildcard.
The same command works perfect on another computer (XP machine; source and dest both on XP machine).
can i use the value of one variable to generate a name for another variable? for example i want to use the counter from a "do while" loop to name and define a variable each time the loop executes. for example
objectnames1=`ls -a` objectnames2=`ls -a` etc.
i don't have a script yet but each time through the loop i intend to cd to a particular directory and then define a variable containing a list of each object in that directory as values. for the rest of the script to work, each variable generated has to be unique, and i can't think of a good way to accomplish this.
if using a value from one variable to name another isn't possible, can anyone think of a more elegant solution? i know limited syntax but i'm willing to read up...
I am trying to alter the character position of residue numbers above 999 in a pdb file.The following script is an attempt to:1) Get all unique pdb residue numbers (in column 5) using awk and assign it to a variable i.2) Loop through all the values in $i and if it is greater than 999, shift that number one character to the right using sed.However, the script only manages to alter the final residue numberCould anyone please advise how I can loop through all values in $i and shift it one character to the right?
#!/bin/bash # Script to alter position of residue number in pdb file for resid above 999 i=$(awk '{print $5}' wt-test.pdb | uniq)
In my CentOS configuration, when I use vim6.3 to edit a file, then close it, and re-open it, my cursor starts out at the line where I last left off. In my cygwin (on Windows) configuration, when I use vim7.3, I don't get this behavior. The viminfo does exist and does seem to get read (because if I type '0 it will go to my last cursor location - but that is globally and could change the file being edited). I've also looked at the .viminfo file and see it getting updated as expected. In my .vimrc file, I have this:
Quote: set viminfo='100,<50,f1,"500,/100,:100
Note that on the CentOS side if I open foo, then I open bar, then I open foo again, my cursor is in the right place for foo, whereas on cygwin if I do this, my cursor would be at the 1st line of foo.. If I were to type '0, it would actually switch to editing bar and put the cursor where I last left off. Anyhow, this all boils down to asking how I get my cygwin vim to act like my CentOS vim.