Ubuntu :: Appending Text To The Output Of Ls?
Jul 14, 2011
I was wondering if it is possible to append some text to the output of ls. Like say, if i wanted to create symbolic links for all the files under a folder in my hard disk to a folder on my desktop, I could say (Pretty sure this won't work, but I am looking forward to something like this) echo ln -s | ls . This should append ln -s to all the files of ls.
View 2 Replies
ADVERTISEMENT
Mar 21, 2011
I want to append following text to my profile file from script:
JAVA_HOME="/usr/lib/jvm/java-6-sun"
CATALINA_HOME="/usr/share/tomcat6"
CATALINA_BASE="/var/lib/tomcat6"
ANT_HOME="/usr/share/ant"
export JAVA_HOME CATALINA_HOME CATALINA_BASE ANT_HOME
Kindly let me know how can I accomplish this?
View 2 Replies
View Related
Mar 10, 2011
I wish to append a text at the start of every line and save it to another file without changing the original file.know the command
For example:
Orignal.txt
a.txt
[code]...
View 5 Replies
View Related
Feb 13, 2010
I am trying to find sed command combination to print out the "start command" line, the id line and all lines between "details" and "stop command" only if "error" exists. Here's the original output (test.txt):
start command
id 1
kajsdlfjsalj
[code]...
View 3 Replies
View Related
Feb 6, 2011
im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.
echo $(ps aux) >>out
The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.
View 5 Replies
View Related
Feb 15, 2011
I'd like to write a script that invokes a gnome-terminal session which slowly reads out text like the phosphor screensaver (could be anything, a log file, ascii art, song lyrics, whatev) and then closes. I can invoke a terminal using [gnome-terminal -e 'cat /var/log/dmesg'] but the output flies pass by too quickly.any way to slow it down? I know it seems like an odd request but if anyone has a suggestion I'd love to hear it.
View 3 Replies
View Related
Mar 13, 2010
How can I record text to speech output from festival to an audio file like mp3 or ogg?
My guess would be to pipe it to a command line recorder
View 1 Replies
View Related
Apr 13, 2010
I'm having a slight dilemma on reading data from a text file and outputting it into a table then displaying it. Basically I'm writing a shell script that takes information from text files then outputs the data into a table with 4 headings. The extracting of the data is fine, but creating a table i'm having problems with. My code extracts the data outputs the string to another file which works fineThe text file looks like this
mr smith 1 purchase oct 2007
mrs smith 2 purchase nov 2006
i want it to look like this
[code]....
View 7 Replies
View Related
Mar 3, 2011
I copied and pasted this from someones signature.d/__How did they write that horizontally mirrored 'd' at the end? How do I do that in Linux?
View 5 Replies
View Related
Apr 29, 2010
has no MTA (Postfix, Sendmail, Exim) installed so it can't email me the results of any cron job I schedule. I would then like to have the results from Cron be dumped into a small text file so I can read it later to view any issues.Right now my job is as follows:Code:01 18 * * * /usr/bin/shellscript.shAbove you see my script I want to run every day @ 6:01 pm. My question is what would the cron line look like if I wanted the results dumped into a random text file somewhere on my system?
View 1 Replies
View Related
Nov 5, 2010
Im using this script to save a backup to a NAS, however i want to print the result to a file that later can be mailed to me.
Code:
tar --totals -czf - /var/www | ssh user@host "cat > /backup_path/`date "+%Y-%m-%d"`.tar.gz"
i have tried just adding ">> logfile.txt" at the end of the command, but that obviously does not work. How should i do this?
View 2 Replies
View Related
Jun 9, 2011
Is there a way to color particular words printed on console based on user preference? For example I need to color text 'error' when a particular program is compiled.
View 2 Replies
View Related
Mar 4, 2010
it compares two files using md5... if they are same , a corresponding character is output to a text file .. but the problem is it gets appended by default.. is there any way to output in a normal way because the text is a message and it should be of proper format
here is my script
Code:
#!/bin/bash
g=`tail -1 new.txt|head -n 1`
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for((i=1 ; i <$g+1 ; i++))
[code]....
the message is supposed to be hello , i need to get rid of the endlines somehow..
View 2 Replies
View Related
Dec 18, 2010
I am looking for a prgramme that output the lyrics when I give it an mp3...
Code:
fetchlyrics mymp3.mp3
based on its data inside of mp3
View 7 Replies
View Related
Jul 28, 2010
How to output to a text file the compound command:
Code:
find -type f -print0 | xargs -0 grep -l "desired text"
I have not been able to find the answer.
[code]...
View 5 Replies
View Related
Apr 12, 2010
I'm having a slight dilemma on reading data from a text file and outputting it into a table then displaying it. Basically I'm writing a shell script that takes information from text files then outputs the data into a table with 4 headings.he extracting of the data is fine, but creating a table i'm having problems with. I think it is possible to do it using the awk function, but so far i'm having a lot of difficulties.
View 14 Replies
View Related
Oct 18, 2010
I've created a script to test network speeds but I've run in to a little problem. The command outputs this:
Code:
Client connecting to 192.168.111.230, UDP port 5001
Sending 1470 byte datagrams
[code]...
View 1 Replies
View Related
Aug 5, 2011
Am having issues getting the output from a script to be logged in a file. I need the script to output both the stderr and stdout to the same text file.
At present I have the following script:
Code:
#!/bin/bash
echo TR3_1 > printers.txt
snmpget -v 1 -c public 10.168.**.* SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 &>> printers.txt
[Code].....
View 4 Replies
View Related
Feb 7, 2011
I want to write expdp output in a text file using a shell script
If i write like below:
It will write whatever is there in log file to text file
But, sometimes export fails with out start taking export (without generating log file) because of job already exists error. such times, we dont know about that error until we check manually... so i wrote like below:
But still it is not writing anything in to text file using above stmt...
View 1 Replies
View Related
Jan 26, 2011
When I try to play a dvd and give mplayer no options, it defaults to "X11" for the video output, which maxes out the cpu. To get around this, firstly I tried to play the dvd using "cvidix" in the console.
I used the following command:
mplayer -ao alsa -vo cvidix -fs -framedrop -stop-xscreensaver -dvd-device /dev/dvd1 dvd://1
This played the dvd, but the console text was still visible over the top of the movie; i.e. mplayer was playing in the layer beneath the console text
Then I tried using xvidix in X:
mplayer -ao alsa -vo xvidix -fs -framedrop -stop-xscreensaver -dvd-device /dev/dvd1 dvd://1
This gives a green line about 5mm thick down the right side of the screen, but other than that it is ok.
View 6 Replies
View Related
Sep 29, 2010
I have the following as my $PROMPT_COMMAND in .bashrc:
Code:
PROMPT_COMMAND='
if [ $TERM = "screen" ]; then
MYPWD="${PWD/#$HOME/~}"
[ ${#MYPWD} -gt 20 ] && MYPWD=..${MYPWD:${#MYPWD}-18}
echo -n -e "33k$MYPWD33\"
fi
'
I am trying to append items to my PROMPT_COMMAND in another script/on command line. If I do the following:
[Code]....
I get no error. I've echoed the value of $PROMPT_COMMAND in both cases and their output is exactly the same.
View 4 Replies
View Related
Mar 12, 2010
I have a Toshiba Satellite L505D-GS6000 it had windows7 on it when I bought it new. Needless to say windows just ran too slow. The only Ubuntu distro that would boot up was Karmic 9.10. I had to append the phrase acpi=off to get the live ISO to boot I had to type acpi=off after the word splash. I saw it would boot so I installed it as the only OS on this computer.
Now when I boot up I am hitting the power button once and the back on again to get to the grub. I hit the E key use my arrows down to the word splash type acpi=off. Then hit CTRL X to boot up. How do I put this permanently into Grub2.
View 10 Replies
View Related
Aug 9, 2010
I am trying to run prstat for an extended time, outputting to a file and appending a time-stamp to each line (running on Solaris 10). I have tried this:
prstat -c -U usrname 60 480 | nawk '$1=="PID" { "date +%d%m%Y-%H:%M:%S" | getline d ; close("date") } { print d,$0 }' > /tmp/fileName &
this only appends the time the command was started to each line. I would like to fix this so that a new time is recorded every 60 seconds.
View 1 Replies
View Related
May 10, 2010
I'm trying to convert my flac files to mp3 to play on my portable player, however it is not appending the tags that are on the flac files to the converted mp3 files. However, I thought that pacpl was supposed to support this.
View 2 Replies
View Related
Feb 8, 2011
this is how we append a file at command line its like
cat>>file.txt
adasds
^D
but how to write the code for appending a file in a shell script i tried but its not running
cho "the contents of the file before appending"
cat ab.txt
echo `cat >> ab.txt
[code]....
View 3 Replies
View Related
Jun 21, 2010
I'm working on some code where I have two files. I know I can use cat file1 >> file2 to append file1 to the end of file2. What I was wondering is how I could append the first line of file 1 to the end of the first line of file2, then the second line, and so forth.
So if file1 was :
cat
dog
mouse
file2:
orange
red
blue
I want file2 to be:
orange cat
red dog
blue mouse
Also I need it to remove any duplicates from the same horizontal line.
View 5 Replies
View Related
Jun 4, 2010
I have ldap authentication working and the machine is joined to the domain, but I have to append the domain name to my login every time I log in. example: user@domain.I've been unable to find away to log in without appending the domain name to the username. Any ideas on how I can force the machine to automatically append the name for me?
View 2 Replies
View Related
May 18, 2010
Suppose I have a variable called filename which contains the name of a file but the name does not contain an extension.
View 4 Replies
View Related
Nov 26, 2010
Is there a way to automatically append date to the filenames of the photos imported using shotwell or f-spot?
View 9 Replies
View Related
Apr 9, 2011
How to get output of text file containing account number, debit amount, credit amount,date using shell script?
View 1 Replies
View Related