Programming :: URL With Parameters Containg Ampersand?
May 20, 2010
[URL]... The above url is generated by PHP code.
Code:
if($msg=="No capex advice")
echo " .. <a href="upload_capexadvice.php";
if($msg=="No purchase order")
echo " .. <a href="upload_purchaseorder.php";
if($msg=="No invoice")
[Code]...
I pass two parameters in a URL, s and q. I recently ran into the problem that the & in the value(aerial&satelitecity)causes a bit of trouble so I need to replace it. After some research I found that it needs to be replaced by %26. I've tried the standard PHP functions htmlspecialchars and htmlentities, but they translate to & Is there another function that I haven't found yet or must I write my own?
View 2 Replies
ADVERTISEMENT
Jun 25, 2011
This dir was created during a download from tthe web. Example: smith&johnson Impossible for me to change to that dir. The shell interprets as the the background indicator. I tried enclosing the name in quotes, but no use.
View 12 Replies
View Related
Mar 8, 2010
Specifically I'm trying to run xmacro from within a c program. If I were to run it from the terminal I would do it along the lines of Code: xmacroplay :0.0 < script_file.txt, but I want to run it from my c program. I'm fine with my c program running it from the terminal if that's possible and easier but I'm guessing there must be a better way.
View 3 Replies
View Related
May 3, 2011
I have a bash script where I am replacing a date with a variable
Code:
variable="date"
sed -r "s/([0-9][0-9])/([0-9][0-9])/([0-9][0-9][0-9][0-9])/$variable/g" /path/to/file.txt
I have googled but cant find any info on what the -r, or sometimes I have seen -i and -e, after the "sed" I googled "sed parameters"
r appears to output the replaced date, but not change the original file. Usually using -i will change an original file for me. Does anyone know what the -i, -e, -r are about? A link to an explanation would be good, as I have been unable to find one in my searches.
View 10 Replies
View Related
Mar 12, 2011
I have to display from the list of files given as parameters the name of the file with the largest number of words and their number.(with AWK)
View 2 Replies
View Related
Jun 14, 2011
I know a program running in the background can be brought to the foreground by typing 'fg'. So, if
command_line &
really runs the program in the background, my question has just been answered. But then all reduces to this question (yeah, I know; but I'm asking in earnest): does the ampersand sign make the program run in the background?
View 3 Replies
View Related
Apr 16, 2011
I get no print to stdout on screen from the C code.Does bash somehow block or mask it?I get print from bash. I get this error in the non-test bash script like: let "rdval = $rdstr"syntax error: operand expected (error token is " ")The let command prints rdval= but I presume this is due to the printf test statements getting in the way.I am getting no compile errors. Why does the C code not print the values specified?
View 2 Replies
View Related
Apr 12, 2010
I am setting up my test / development machine with the following scenario in mind : I boot the machine and then select one of a number ( e.g. 3 ) boot options in Grub ( Normally "OpenSuse", "Safe Mode" etc., but in this case "System Restore Dev.", "System Restore Test" ). The only difference between these options are the settings ( e.g. "vga=378" ) in these cases something like "distro=dev" / "distro=test".
In a script run on the booted system I can extract the value of the "distro" parameter ( in this case "test" ) and use it as input for a command line tool. Meaning that name entered as the value for the "distro" parameter is used for loading a file when the system is up and running. The command line tool then restores the partition with the contents of the file and reboots the system.Now, my problem is this : How to I access the Grub arguments? Code snippets ( in shell scripting or python preferbly ) are more than welcome.
View 10 Replies
View Related
Apr 6, 2010
I've searched online and found many examples using getopts, but nothing that clearly explains it use, nor any examples of what I'm trying to do. I have a script named "process". It can take from 0 to 3 different options. I'd like to be able to handle these options regardless of the order that they are entered.
Syntax:
process [-v] [-d #] [-h|-?] [string]
-v = verbose mode on
-d # = how deep to do the process, expecting a number parameter
-h or -? = show command usage
string = only process lines containing the specified string
[Code]..
View 5 Replies
View Related
Jan 17, 2010
I have the following problem. I have my script /usr/lib/cgi-bin/login.cgiand two page in /var/www, home.html and welcome.html.When I log in /var/www/home.html with email and password, then login.cgi to extract exact user informations from mysql. Now I'd like start welcome.html page from login.cgi and passing user informations trought parameters
View 4 Replies
View Related
Jan 16, 2010
insmod: error inserting 'kernel.ko': -1 Invalid parametersI am getting this error when i am try to insert kernel.ko into kernelMy systemfedora 12 with gcc 4.4.2insmod kernel.koinsmod: error inserting 'kernel.ko': -1 Invalid parametersmy program
__________________kernel.c________________________ ___________
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
[code].....
View 4 Replies
View Related
Apr 26, 2010
Ive read a few books and a lot of tutorials on C but can't find this topic explained in a deliberate way.I can find bits and pieces but nothing thorough.
View 9 Replies
View Related
Nov 28, 2010
This is the following exercise:Adapt this to write a script storedList that takes two command line parameters. The first parameter is the name of a directory, the second parameter is the name of a directory should be store i.e# ./storeList.sh /etc etcFilesListHow can you refer to the variables that represent the words passed in on the command line?
My Script's file:
#!/bin/bash
if test $# == 2
[code]...
View 4 Replies
View Related
Nov 9, 2010
I have a text file that needs to be updated to be used by some fortran code later. it looks like that:
1,1 !Ms for y-stations, Ns for x-stations
0,0,0, !xsta, ysta, zsta
I need to replace the "0,0,0" with new values for xsta,ysta and zsta;
View 4 Replies
View Related
Apr 1, 2011
I want to pass ip address,port address and some parameters from command line using python script.The ip address and port address for establishing socket connection and remaining parameters to execute different connection.
View 1 Replies
View Related
Oct 18, 2010
I have two txt files containing x and y coordinates: xcoord.txt & ycoord.txt. I need to open them; read them line by line to get each coordinate; then each time I need to update Xs and Ys parameters inside another file called "dc.in" with the grabbed values.
Finally each time I need to run two exe files ( dc_2002 and st_vac) and produce corresponding output for each Xs and Ys ( dc.in is an input file for this exe files)
I have written the following code but it does not work:
View 14 Replies
View Related
Mar 28, 2010
I have tried to learn how 64bit asm (nasm in my case) works and found, among the many disparate pieces of info on the net, a few vague inferences that floating point registers can be used for other purposes than what they are intended for, example: "64-bit Linux allows up to fourteen parameters to be transferred in registers (6 integer and 8 floating point)." This would be fantastic for string operations/manipulation (I have never used asm for floating-point operations), can anyone shed a bit of light?
View 8 Replies
View Related
Jan 12, 2011
How to use CHMOD in linux? When I try to delete a file/folder, permission is denied. What exact params must I give for chmod here? This is what I need to do. Execute a command ./build.mips , but I get permission denied error.
kirti@sgf:/disk/go$./build.mips
-bash: ./build.mips: Permission denied
View 3 Replies
View Related
Feb 8, 2011
I have a strange problem with RHEL4.7, with kernel 2.6.9-78.
I cannot set any kernel parameters by editing sysctl.conf file and run sysctl -p, everytime the old value appears, while it was possible before.
I tried to edit files under /proc by using vi when trying to save it gives me: E667: Fsync failed!
While echo 1>/proc/sys/net/ipv4/ip_forward also cannot edit the file.
Also I mounted proc device on another mount point:
# mount -t proc proc /mnt
View 1 Replies
View Related
Mar 11, 2010
A couple of weeks ago I installed Karmic. In previous options in Audio CD Extractor I modified a string in the "edit preferences" to set the variable bit rate for MP3 ripping. Specically the option "VBR=4" (Lame New Algorthym) However, I now notice that the "VBR=" option is no longer there!
I've searched around and read some indications that using a newer realease of Lame this is no longer necessary. But its a bit unclear to me. Do I need to insert VBR=4 or not? and if I do anyway will it affect anything?
View 5 Replies
View Related
May 22, 2010
when one select System -> Preferences -> Mouse Preferences -> Touchpad -> Enable mouse clicks with touchpad, this results in sydaemon being started with the following parameters:
Code:
syndaemon -i 0.5 -k
while this is fine, for me the half second threshold seems to be too short, and I
[code]....
View 6 Replies
View Related
Mar 11, 2011
From the man page for bash...
Quote:
If the -c option is present, then commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with $0.
Code:
View 6 Replies
View Related
Jan 25, 2011
Just installed squeeze from previous Lenny and am having problems. With Lenny, for the tv card, needed: the modudule saa7134 card=54 tuner=78, i.e. had to give it the card= tuner= stuff - it could not autodetect that bit. Squeeze appears the same:
Code:
[ 5.055340] saa7133[0]: subsystem: 17de:7253, board: UNKNOWN/GENERIC [card=0,autodetected]
So, question, how do I give it the module options? - the problem is 'modconf' will not unload the saa7134 module because it says it is in use, even though the TV is not being used. And # modprobe saa7134 card=54 tuner=78 does not appear to do anything - it does not say anything but nothing shows on dmesg. Here is how tvtime, a fairly fool proof tv player, behaves:
Code:
root@fido:/home/lugo# tvtime
Running tvtime 1.0.2.
Reading configuration from /etc/tvtime/tvtime.xml
Reading configuration from /root/.tvtime/tvtime.xml
mixer: Can't open device /dev/mixer, mixer volume and mute unavailable.
[Code]...
View 2 Replies
View Related
Mar 21, 2011
I've a script that it's invoked with n-variable parameters. Here's an examples:
Code:
./myprogram.sh inputdir FIELD1 FIELD2 ... FIELDN outputfile In the script I would like to get the FIELD names that were passed.
View 4 Replies
View Related
Mar 13, 2010
I have the following bash script:
Code:
Which has the name 'extractemails.sh' and works just fine.
However, i whish to be able to give the url (or any other url) as a parameter when i run the script like this: $ extractemails.sh [url]
What should i change in my code? i have never tried passing parameters to scripts before.
View 4 Replies
View Related
Mar 6, 2011
the problem is i am changing the parameters in main.cf file but postfix is not accepting them. its still inheriting my system's host name and domain
here is my configuration
my main.cf file
myhostname = mail.example.com
mydomain = example.com
myorigin = $domain
[Code].....
Nothing is accepted. I have test this on CentOS 5.5 and Fedora 14 both have the same result.
View 3 Replies
View Related
Dec 21, 2010
I am reading a tool manual and it instructs to use such a command:
Code:
Especially, what does the 'sort' parameters and awk do?
View 8 Replies
View Related
Jun 21, 2010
I am looking for ways and tricks to speed up the time dd takes to backup a whole partition and/or a whole hdd to a file.I recently used Acronis TrueImage on a Windows box at work to clone a 230GB hdd onto another..the process took around 5 minutes, if.Now, I've done hdd backups into a file or other hdds via dd before, however compared to that, they've been horrendously slow.What are the best settings for getting a -fast- backup/ restore via dd of, say, an ext3 filesystem?
View 7 Replies
View Related
Mar 12, 2011
I installed Debian 6 last night on an older Compaq. For the system to properly reboot and shutdown when requested, both acpi=force and reboot=warm must be in the boot parameters, this was required with other Linux distros installed on this hardware. Otherwise, the system erroneously shuts down when reboot is chosen.
I would like to know how to permanently add these so they pass each time the system is turned on.
I already added these to /etc/default/grub (and ran update-grub afterwards) and at the next startup, noticed they were NOT in the parameters when "e" was pressed at the boot menu.
View 5 Replies
View Related
Feb 9, 2011
I want install the next GDM Theme [URL]. The problem is in modify the archive /etc/gdm/custom.config for install the theme. I don't know what parameters or command write. I just know where copy the folder of the GDM theme, but the configuration no.
View 8 Replies
View Related