General :: Application Redirect To File
Aug 5, 2010i want to redirect application to file.i m redirecting it by command
konsole -e 'application name' >> applog.txt
but it is not working.
i want to redirect application to file.i m redirecting it by command
konsole -e 'application name' >> applog.txt
but it is not working.
I am trying to grep multiple numbers from file, grep does have the -f option for that.
Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with
Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?
I know that set -x can be used for debugging a shell script.But I want to redirect the output of set -x to a text file.eg: Say test.sh is my script,
View 3 Replies View RelatedSo, I have two application that I've deployed. Let's say:
[URL]
I stopped my application version 14 but I want to create a internal/external link so when the user types the address [URL] , it automatically goes to my newer version application [URL].
Im using SunOS 5.9 and tomcat 5.0.28
I multi-boot several Linux distributions with an assortment of additional data partitions. I get frustrated whenever fsck is forced during boot. (It ONLY happens when I'm in a hurry don't you know...) So I wrote a script to automate forced fscking when I do have the time. (And/or while I'm doing something else in another workspace.
Because I multi-boot, I've learned that udev doesn't always assign the same device name to each drive for all distributions. I've had the same partition identified as hda5, sda5, & sdb5 by different distributions (without doing anything to affect the boot order) So my solution is to keep a list of partitions in a specific file on each distro with valid device names according to that distribution's udev process. Actually I'd use LABEL= instead but the labels don't show up in /etc/mtab, and I like to make sure a partition isn't mounted before I try to fsck it.
I can make this work in a for loop using cat. But I've seen so many things about NOT using cat that I wanted to rebuild my script. I can make this work with a redirect instead of cat via a while loop, But I "LIKE" old style for loops. But I can't seem to find a way to make a redirect work with one. I thought this might make a good first �LinuxQuestions.org� question. I'm also open to any other suggestions on better/alternative methods... Is it possible to redirect from a file into an actual for loop?
My script is as follows:
Code:
#!/bin/bash
# FsckEm I script to force file system checking on unmounted ext2/ext3/ext4
# partitions in preselected list. FsckEm accepts no options. Partition
[code]....
I was trying to redirect the output of two variables to different columns of a .csv file in MS excel like this,
Code:
echo "$a $b" > abc.csv
But I am getting both $a and $b in the same column, is there anything I can use instead of to move the value of $b to the next column? Or is there a good different approach to do it?
I have multiple jvm instance of tomcat application on a unix server and its running on different port.i would like to redirect the port and uri.How can i achieve this with the help of apache. i heard we can do it using mod_proxy.
[URL]
Currently when i access http://myapp.xx.com/offer i get 404 error.
one way to achieve this is to rename my exploded app name (offers-service-main) to offer. But i dont want to do that.anyway to achieve it.
This what i have done from my side.
1) installed apache 2.2 with mod_proxy
./configure --prefix=/usr/local/apache2.0
--enable-proxy
--enable-proxy-connect
--enable-proxy-http
2) Added the below config in apache
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /offer http://myapp.xx.com:18120/offers-service-main
ProxyPassReverse /offer http://myapp.xx.com:18120/offers-service-main
But the above configuration dosent seems to be work. Let me know if i need to do anything on the tomcat side.
I wrote a short script that sleeps for 30 seconds then outputs "Done" to the screen:
sleep 30
echo Done
now I want to re-direct the output to a file, I tried:
./scriptName& > fileName
Didn't work, "Done" still came out to the screen.
I have a python script that when run outputs to screen.
eg.
./international_sms_check.py 0403000511 919227434827
TS 21 check ok
TS 22 check ok
sms successfully delivered from 61403000511 to 919227434827
But when I try:./international_sms_check.py 0403000511 919227434827 > test
The file test is created but there is nothing in it.if I try ls > test this works fine with output of ls redirected to file test.
How system call internals could be known ? I mean for example if i take the example of write system call of linux kernel, where i can find out the code of write() system call in the kernel source tree ? The problem is write() system call directly write on console.If we want to write the data on some web page then write() system call will not do that ? How to redirect out data from console to application like html/web page?
View 6 Replies View RelatedI have this script in the past for csh: Code: ./a.out |& tee prints.txt which will redirect all printfs in the C program to the prints.txt file and at the same time show them in the console. How do you do this in bash? I have seen this, [URL] but it does not work for my bash and sh shells. It says:
Code: -bash: syntax error near unexpected token `&' and
Code: -sh: syntax error: unexpected "&"
I am writing a script in which I am using AWK to append to a line in a file and save the file. The command I am using is:
Code:
awk '{s=$0; if ( NR==4 ){s=s ":/usr/java/jdk1.6.0_19/bin" } print s;}' $appName > $appName.new
[code]...
I'm working on some scheduled task script files to keep nightly backups of some of our database information in place, and it's a bit annoying when they blow up. I know how to redirect stdout and stderr to a flat file I can view when I come in, and I know that 2>&1 maps them both to the same file (whatever was named in 1). However, I'm running into some cron-time situations where it's easier to have the two streams together, and other cron-time situations where it's easier to have them separated. I can't really tell which is going to happen; is there some way I could create both kinds of output file for my scripts, so that I've got a std_err only file and an interleaved std_out/std_err file?
Note: I've looked at the 'tee' command, but I don't think it will work for what I'm after. 'tee' appears to only work with stdout; I'm trying to work with stderr.
I cannot redirect output from commands such as iptables, iptables-save, and ifconfig. For example, any of the following DOESN'T work ( as root ):
Code:
iptables > tmp
iptables-save > tmp
ifconfig > tmp
The file tmp is ALWAYS blank, that is, 0 bytes in size. Wackier things DO work, such as:
Code:
echo "`iptables-save`" > tmp
iptables-save | tee tmp
Other commands like:
Code:
ls > tmp
DO work as expected.
Note that this problem happens regardless if I log-in remotely via ssh or locally on the computer in question. I am clueless as to what is causing this. Any ideas?The box is running 2.6.25-14.fc9.i686 and boots to runlevel 3. The modifications I've made to the box since installing the OS are things like compiling/installing latest OpenSSH,OpenSSL,httpd,BerkeleyDB,subversion,zlib etc -- nothing really out of the ordinary I'd say.
I'm looking for a Web File Management Application to use in my intranet.
All I need are users ACL and a simple interface. Ldap authentication would be a nice fit
I saw something around like PHPfilenavigator, and for further info, I like Ubuntu distro. Right now I'm using the filemanager inside eGroupware but I'd like to dump it
Can anyone give me some opinion and suggestion?
I want to edit the config file of an application I have installed and the documentation says that the config file is per-user and therefore stored in "~/". Which folder is that? The app itself is installed in "/usr/local/bin/".
View 5 Replies View RelatedI have a web application which calls scripts on the linux box it's deployed on. Currently, there are some file permission issues which prevent the scripts from running properly. How can I give my web application the needed permissions? I thought of creating a user 'group' , assigning my web app to that group, and changing the ownership of the script files to the new group. Unfortunately, I'm having trouble with the following: What user id does my web app have? If my web app does not have an user id,
View 3 Replies View RelatedI am new to the embedded domain.I am learning about cross compilation. Just i want to compile an application and an driver file for ARM platform. I have downloaded the toolchain binaries from [URL]..
View 3 Replies View RelatedI am again struggling to make a script work, but hey, it is fun, I am learning new things. I discovered the set -x option which was, for me, like the second coming. Still, what I am not able to do is redirect ALL output to a (log) file, including what is produced by the -x setting. Let's assume a very simple script:
Code: #!/bin/bash
set -x
source="/home/atelier/Bureau/"
ls -la $source and I am running it as . test.sh >> /var/log/test.rmcb.log
The result of ls goes inded into the log file, but the rest still shows on the console where I am running the script: Code: ++ source=/home/atelier/Bureau/
++ ls --color=auto -la /home/atelier/Bureau/ Is there a way to redirect EVERYTHING to the log file ?
I have simple blog I created myself. I am using mod rewrite to redirect all to a php file. But I have links in google like [URL]
How can I match it with regular expression? I try with variants of ^([^/?]+)/$ but with no success.
The desired result is to redirect such addresses to [URL] or to 301 page
Using gnome terminal (Ubuntu 10.10), is there a way to execute the default application associated to a file type, only by typing its name, as it is possible with Windows ?
For example, say I create a mime type associated to every file with the pattern *.abc. Lets say I associate this file type to application 'my_app'.
If I have file 'my_file.abc' in current folder, what I want is that when I enter only 'my_file.abc' at the prompt, it executes 'my_app' feeding it with 'my_file.abc' as first argument. (assuming of course 'my_app' is in the path)
I know this is possible in GUI gnome. But is it possible to do it too in shell command? Let say if i type this in shell:
#file.txt
then it will open gnome-editor in nautilus which open file.txt. gnome is the desktop manager. nautilus is the explorer windows in gnome. gnome-editor is one like notepad in MS windows.
The Linux File system uses the file path notation to abstract how data is accessed. Path really must be an environmental variable for the applcication that converts the path name to an inode so what is this application/Daemons name?
View 7 Replies View Relatedwhich file is edited of kernel for boosting the application performance at boot
View 2 Replies View RelatedI want to redirect the output of a command to a file, but not at the end of the file, but after a line. Do you know how can I do it?
Something like:
cat file_a | grep some_text >> resulting_file
# in this file I need to place the output from grep, but not at the bottom of resulting_file, like it would normally happen, but after line .. 3 , for example
Then, if file_a is:
abc x
some_text q
zxc w
[Code]....
I'd like to redirect the output to a file and to the console. I know about tee but the issue is that it waits until the first process finishes.e.gecho "hello world" | tee test.txtfirst calls echo and then tee.Is there a way to redirect "on the fly" ?
View 5 Replies View RelatedI'm sure this is something simple, but I've googled all over and can't find the answer for the life of me. I've got an apache server and I need to redirect all requests to HTTPS in the same domain, except for 1 html file the load balancer hits and needs to get a 200 on. Can anyone point me to some documentation or show me what I need to add to the httpd.conf file to get it working properly?
View 1 Replies View RelatedI have a little complex Makefile system. A parent Makefile call dozens of Makefiles in subdirctories. And the subdirctory Makefile calles shell script to do real building. I want to grab all output this Makefile system generate. So, i employ "make 2>&1 > make.log". but not all output messages are filed into make.log. The message generated by sub-makefile called shell script cannot be recorded into make.log. And another curiouse thing is, if i launch "make 2>&1 > make.log" in a perl script, all output do be sent into make.log.
View 2 Replies View RelatedI would like to get the predefined application icon to open the same file types.
for instance: *.avi, *.mp3 to have the VLC icon
and other application to have the icon of their default application.
So far I only found tips to install single icons or to add icon packs. :S
and is there any way to when you install an application make it default for such file types ?
I'm trying to set up a framework where people connected to same wifi connection can enter a local site for developing purposes.I want them to be thrown to a local copy (development copy of the site) when they type in www.development.loc in the browser.I don't want to connect the world, only people connected to my wifi.Anyone willing to help by stating what I need to edit to :1. Allow me to access local copy of site that's on computer (located : /var/www/developmentsitename/) using www.development.loc in browser./and2a. What do I edit to create the server accessible by other computers connected to same wifi connection. 2b. If another computer can connect to this site now, can we create a virtual desktop setting in which workers can work as if they have their own partition on the server to work on and upload work onto the development server.
View 2 Replies View Related