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
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++))
the message is supposed to be hello , i need to get rid of the endlines somehow..
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.
I have an pdf file on my linux RHEL 4.7 machine. I can open that file but when i click on 'saveas' to save the file in 'Text' format there are no options i see there. I need to save the 'pdf' file to 'text' format. could anyone tell me how to save the pdf file to Text format. Iam using 'KDE'
I've got a rather large CSV file (~700MB) which I know to consist of lines of 27-character alpha-numeric hashes; no commas or anything fancy. Somehow, during its migration from Windows to Linux (via winSCP and then a few regular SCPs), it has converted into some kind of binary format I am unfamiliar with.If I open the file in vi, everything appears fine, and it says [converted] at the bottom, although I know it's not a line endings issue (and dos2unix doesn't help). If I 'head' the file, it looks proper except for a " at the beginning of the first line. If I open up the file in nano, however, I see the at the start and then "^@" before every character (even newlines and EoF).
If I try to re-save or copy the file (say via: head file.csv > short.txt), this special encoding is preserved. I copied the first ten lines out of vi (which displays it properly) into my Windows clipboard via my SSH client, then pasted it into a new text file, test.txt. This file is visually identical when opened in vi (and similar through 'head', minus the ), although it's roughly half of the filesize. I have no idea what format this once-text file got converted to (it's notoriously hard to search the internet for symbols), but surely there must be some way to convert it back.
I'm trying to run a CGI file with Apache2, but when I navigate to it, I just get the file in it's plain text format and not actually parsing the file. What do I need to configure?
I've tried this Code: <Directory /var/www/> AddHandler cgi-script *.cgi Options +ExecCGI </Directory> And I've tried this Code: <Directory /var/www/> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny [Code]...
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.
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...
I'm still trying to find out if my coby mp3 player will actually play mtv video files as is advertised.
ffmpeg -formats does list mtv but the only command I really ever used was one to convert a vid to an mp3 so I tried Code: ffmpeg -i test.mp4 -acodec copy output.mtv it returns Code: Unable to find a suitable output format for 'output.mtv' I can't find any mtv files online for purchase or free for that matter, so I know this is all pretty obscure but shouldn't there be a way to convert them since ffmpeg lists mtv format?
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
i need a php script to format and display a select amount of text from a file or a cron job that'll do it (with grep etc) and out put to a file but whatever is easier i want to display all the banned ip's i have in my .htaccess file i have a lot of lines in my .htaccess file but i have a line that read like this:
my device is >>full aricle : [URL] I am modell : PT014AA#ABA sound was working before on the same version on ubuntu... but after reinstalling it >>>it stoped wprking although I make no changes,adding priveledges to my account...my system is up to date.
I usually work with plain text files, and when moving them across platforms, the differing format creates problems. I want that whenever I save a file with extension *.txt, it be saved as DOS format, and all other extensions or without get saved as Unix format.
I have a form that have a browse button, convert to ASCII button, cancel button and text area... all i have to do is...? when i click the browse button and choose a folder that have a utf8.txt the file that have utf8 will appear or display into the text area... what i can i do to make this..?
I am setting up a file server using Ubuntu and want to make sure I set up a folder structure that will last. Where should I be placing everything that I am sharing (Music, Pictures, Videos, etc)? In theory, if I was setting this up on Windows, I would create a folder directly under C: and set up the different areas of sharing under that (not that that approach would be best either).
Based on constructive criticism, the question is rather ambiguous. My question could be restated to ask "Where shouldn't I set this up? Would /usr be an appropriate place to start? Or would /opt be better?
I have Brother HL2250N. This worked out of the box with 13.0 using the Brother drivers. I also have a Brother MFC-7820N which works fine in 13.0 and 13.37. In 13.37 the testpage from CUPS prints fine. However when I try to print anything from kate or libreoffice I just get pages and pages of text starting with
I assume this the post script file that is printing out. How do I get this to print properly?
Relatively new to Linux, but I'm trying to grasp the proper way to modify the sudoers file. As an example, what would I have to modify in /etc/sudoers to allow a user (say 'user1' for the example) to be able to add/remove software through yum? I'm aware of the fact that I need to use visudo and how to use the vi editor. I've Googled this topic and while I've found a number of pages on the topic, I never see many examples.
Code:RW-00022: Error: - Unable to create file with proper privileges: JAVA_TOP Mount Point = /media/SAMSUNG/d01/oracle/vis/apps/apps_st/comn/java/classes test using command: su applmgr -c "touch /media/SAMSUNG/d01/oracle/vis/apps/tech_st/10.1.3/appsutil/jdk/test.tst" touch: cannot touch `/media/SAMSUNG/d01/oracle/vis/apps/tech_st/10.1.3/appsutil/jdk/test.tst': Permission denied
I am trying to install Oracle ebs on my machine and I keep getting the above error.
Whenever execute the below scriptlet with out proper file name it deletes /tmp directory .I guess this is because value of variable a didnt get initialized and there for rm -rf /tmp/ get executed and entire /tmp directory get deleted.How would i avoid any empty variables to be used in script? as this is a classic case of destructive script.
Code: #!/bin/bash echo "Enter file to delete from tmp"
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):