General :: Resolving Variables In FTP Session
Jun 28, 2011
I set a variable before entering the FTP session (vDate). Then it does not seem to resolve when I try to use it in the session as part of an mput command. $vDate resolves as an empty value. Can you point me in the right direction?
View 1 Replies
ADVERTISEMENT
Dec 21, 2008
I have a simple script that I am writing to parse an XML file for me, and update some version numbers. Basically what happens in my script is that I'm running a grep command on the file to get the current version number, then I prompt for a new number, and then I want to globally replace that version number in the file. The problem is, the sed command seems to only want literal values (it doesn't appear to be capable of resolving variables). For example, this code doesn't work:
[Code]...
I have tried removing the curly brackets from the variable names, quoting them, etc. and nothing seems to work. Should I do this with awk instead (and if so can you kindly write out the command for me because I never bothered to learn awk).
View 2 Replies
View Related
Jan 13, 2010
Im a fresher in PHP.Actually i wanted to know that whether there will be time delay while using session variables in PHP.By using some 10-20 session variables in my code will it affect the speed of the loading of the page.If so then can u suuggest any other method to pass the varaibles which will not slow down the speed?
View 4 Replies
View Related
Nov 29, 2010
I am installing rpm using the switch "--aid". But it is not resolving dependencies! I am using RHEL 5.
View 1 Replies
View Related
Apr 6, 2011
mkvmerge -o <filename without extension>_TV.mkv -S <filename> && mkvextract tracks <filename> 3:<filename without extension>.*** && perl /home/brian/Desktop/ass2srt.pl <filename without extension>.*** && rm <filename without extension>.***
Doing these commands for multiple command line file inputs is the goal. So I can just type ./script.sh *.mkv in my terminal.This is what I have so far, but it doesn't work whatsoever.
View 2 Replies
View Related
Nov 23, 2010
I installed fedora core 10 on my pc & now i have been trying to install samba. I dont have a network so i mount and use my dvd for installation. I lack exotic package management tools like apt or yum yet the system-config-packages tool does not make sense either. so am stuck with the rpm -ivh [package] command.
The issue however is that this command returns querries about missing dependencies when I attempt to install. So is there a way (switch) i can add to tell the rpm command to automatically check and solve these dependecies using the Packages folder on my mounted dvd? - because i believe all these dependencies are on the dvd.
View 1 Replies
View Related
Jan 28, 2010
I have a version of slackware installed as a virtual machine and am not able to ping hosts or otherwise receive data from any IP addresses external to the LAN. I think this problem is due to the hostname of the vm not being recognized by the gateway (ddwrt); the vm receives an IP via dhcp but the gateway does not seem to recognize its hostname (registers as *).
Will readily respond with whatever conf file is needed.
View 14 Replies
View Related
Apr 26, 2010
The problem of loop detected when resolving the name from dns.Why the problem of loop detected comes when name is resolving from dns.
View 4 Replies
View Related
Sep 22, 2010
I have been casually using Unix for about 20 years, but I've never really done anything beyond basic user things unless I had instructions/help.
I've set up an Ubuntu 10.04 system and it works great except for one thing. It doesn't resolve local names.
I can ping or access other systems by IP Address and I can resolve internet names with no problems, but it won't recognize any of the other systems on my home network.
The system is set up for dhcp and everything is defaulted from the installation. There is no DNS suffix or domain set up on my router.
View 8 Replies
View Related
Feb 11, 2010
I have a samba mount in Windows, mounted from a local Linux devbox. The projects on this mount contain a lot of symlinked directories. They all work fine and look like normal directories to Windows. What I'd like to do is figure out for a given file what its real UNIX path is.The context is: in my editor I have a script that runs the Perforce open command, to which I pass the file location.p4.exe edit FILE_LOCATION
However, perforce will not understand this FILE_LOCATION, if on the Linux side part of the path is a symlink. It needs to know the real path.What I need is something along the lines of the Linux readlink command, which resolves symlinks in paths.
View 1 Replies
View Related
May 11, 2010
Info about session timeout.
I use tmout = 15 min in my /etc/profile (along with readonly tmout). i have some issues i need to address, looking for ideas.
1. what is considered a idle "session" ?
2. if i & a process to the background and do nothing is this a idle session?
3. if user uses su to a higher level, are there now two sessions? is the tmout for user suspended until su user time outs or leaves su session?
4. i have some users who will run long sql queries. is there a workaround to have the session remain active until process has finished?
View 3 Replies
View Related
Jul 12, 2010
using variables in CURL.Here's my code:
transfer_to_pcid="AAAAAAAA"
transfer_from_pcid="BBBBBBBB"
basic_password=`ssh rsync@some_test_domain 'curl --silent
[code]....
View 2 Replies
View Related
Apr 12, 2010
hypothetically speaking, can i write a script in which a telnet session is opened and then some more commands are forwarded to that session?
View 4 Replies
View Related
Nov 10, 2010
I have a very bad attempt at hashing the components of an tcp session to assign/locate the session in a hash table bucket. I am pretty sure that it has a very high collision rate and when there are a very large number of tcp sessions my application is having to search a long linked list to find the session within the bucket.
All the hashing functions I have found take a single string input where I need to input several integers and hash them into a single result. My guess is that any real hashing function is going to produce better results than what I am currently doing.
[Code]...
View 2 Replies
View Related
May 20, 2010
I am running Red Hat Linux Enterprise 5; I am always using the export command to set environment variables.Are there any other ways to set environment variables and what are the advantages/disadvantages of them?
View 4 Replies
View Related
Sep 13, 2010
Is there a difference when variables are referred to as $variableName and ${variableName} in bash?
View 1 Replies
View Related
Feb 17, 2010
in gnuplot it's possible to set the value of a variable via linux shell command.or instance we can do
Code:
a="`echo 1`"
b="`echo 2`"
[code]...
View 3 Replies
View Related
Jan 17, 2010
I have installed RDGEN which comes with VPFIT package. When I run the program it says:
"Failed to find help file"
But I ran the program from its main directory where all the files including help files exist. I think maybe the problem is because of this that THEY say:
"Some environment variables should be set before starting RDGEN".
But I do not know what does this mean and how to do that.
These are the variables:
-ATOMDIR
-RD PRSETUP
-RD PRSETUP
-RDSTART
-VPFSETUP
-VPFPLOTS
Would it be possible for you to tell me what does Setting Variable means in this case?
View 2 Replies
View Related
Jun 4, 2010
I have question regarding concatenation of two variables with underscore.i.e. (bourne shell)
Code:
# var1=123
# var2=456
[code]...
View 3 Replies
View Related
Jun 21, 2010
he $g09root is picked up ( in both the csh and the bash), but not the $GV_DIR or the $GAUSS_SCRDIR. I guess it's some stupid error, but it is highly frustrating.Here is the .profile file:Quote:
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
#
[code]...
View 9 Replies
View Related
Oct 12, 2010
Explain the following unexpected results
$ whereis date
date: /bin/date ?
$ echo $ PATH
[code]...
View 5 Replies
View Related
May 9, 2010
Is there a command that can list the variables that I am using in a script? I mean the variables that I created in the script not the environment or local variables. For example if I have a script that has the following var's like : name=Alex, age=20, postal_code=12345, how can I list them all @ once WITHOUT using echo $name, $age and so on. Imagine I have a lot of variables and i can't echo them all.
View 2 Replies
View Related
May 25, 2010
In the following lines I am trying to replace Puppy Linux 5.0 Released with the content of external variable Var. Following lines are in a file called news
Code:
<A title="Puppy Linux 5.0 Released" href="http://lwn.net/Articles/388754/" rel=bookmark><FONT color=#ffffff size=2><STRONG>Puppy Linux 5.0 Released
</STRONG></A><STRONG> | </STRONG>
I have tried following.
Code:
awk -v var=NewNews '/title="[^"]*/{n+=1}{if (n==1){sub(/title="[^"]*/,"title="$var",$0)};print }' news
But it is replacing Puppy Linux 5.0 Released as $var, not with the contents of var.
View 4 Replies
View Related
Mar 14, 2011
I am trying to rename a list of variables in my script using a second list of variables. I want the variables in the second list to replace the variables in the first list such that the first variable in List 1 is renamed after the first variable in List 2, the second variable in List 1 is renamed after the second variable in List 2, the third variable in List 1 is renamed after the third variable in List 2, and so on.
For example:
I know how to rename each file individually, but would like to run Do Loop which can rename all my output files at once.
View 7 Replies
View Related
Aug 23, 2010
Is there a way I can write a file that contains the text which assigns variables, e.g. string="hello world" in a file say, variables.txt and have a shell script assign those variables locally e.g.
#!bin/bash
command_that_saves_variables_locally variables.txt
echo $string
and when I run the script I would get an output of
"hello world"
View 2 Replies
View Related
May 20, 2010
Ive created some custom shell scripts to run during the kernels boot process (they are called from the init script).I was wondering if there's any way to assign a variable that can be accessed between different scripts.For example my first script checks which type of pc i am installing on and assigns the hard drive location to a variable.HARDDRIVE = "/dev/sda1"at the end of the script it calls another script. In this script I cant reference HARDDRIVE as it is blank, to get around this I need to repeat the same code for assigning it.Its more of a space/aesthetics issue but I figured someone might know the solution off the top of their head
View 1 Replies
View Related
Jun 2, 2010
I know many people have asked about environment variables before, but I am having a hard time dealing with these paths while ensuring I don't mess around with the original settings. How would you go about executing these commands in Ubuntu in terms of environment variables?
put /home/stanley/Downloads/ns-allinone-2.34/bin:/home/stanley/Downloads ns-allinone-2.34/tcl8.4.18/unix:/home/stanley/Downloads/ns-allinone-2.34/tk8.4.18/unixinto your PATH environment; so that you'll be able to run itm/tclsh wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put
/home/stanley/Downloads/ns-allinone-2.34/otcl-1.13,
/home/stanley/Downloads/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.
[Code]....
View 1 Replies
View Related
Sep 4, 2010
I am running an application which requires setting environment variables to be set.At the moment, the way I am achieving this is by exporting the EV at the command line, and then running the app from the command line.I want to be able to run the app from my menu (it is already a menu item after I installed it).How may I set the env var so that it is always available, so I can just run the app from the menu instead of from the CLI?
View 1 Replies
View Related
Aug 12, 2011
I have $db and $DATE set in my bash script, then I need to join them like this: mysqldump --user=usr --password=pss --databases $db | gzip > /backups/sqlNew/$db_$DATE.sql.gz;
Unfortunately, that doesn't work. How do I properly join those 2 variables into a filename?
View 1 Replies
View Related
Jun 7, 2010
cwrsync is a great tool for synching "My Documents" to a network drive in Windows. However it uses a portion of cygwin to do this which uses forward slashes instead of back slashes. So, a manually typed command like the following works great: rsync -r --delete --exclude "My Pictures" "/cygdrive/c/Documents and Settings/demo/My Documents/" /cygdrive/j
However, you cannot put a variable like %userprofile% in this as it comes out like this (and is unrecognized): rsync: change_dir "/cygdrive/C:Documents and Settingsdemo/My Documents" failed: No such file or directory (2)
View 1 Replies
View Related