Ubuntu :: Text In Shell Breaks Up?
Jun 7, 2011
I work a lot with Unix bash shell environment. Whenever I go down the directory tree to several subdirectories, i.e., /home/a/b/c/d/ and so on and type in a long command, what happens is that command text wraps around onto the new line but when trying to edit command I can only go back to the beginning of the new line. So, for, instance, say I go to directory and type something like:
/home/a/b/c/d/find . -type f -exec sed -i <- end of line
's/blah/blah/g' {} ; <- new line
Here, the problem is I can't go back to the real beginning of my command that starts with "find", I can only scroll to the beginning of the new line with the part "'s/blah/blah/g' {} ;"
So I effectively loose control over what I typed and can't edit it when the command wraps to a new line. Does anyone else experience this problem?
I also have this problem on our Debian servers so I always have to make sure I type the right command the first time because I can't move back and forth to edit it when it wraps to a new line.
View 9 Replies
ADVERTISEMENT
Mar 31, 2011
I do not know what happened. But when I move the text files back and forth between Windows and Linux, the enters/paragraphs gets messed up and square characters appears. And I think it got worse when I deleted those squares. So now it is one very long line. How do I get the long line to break every 50 characters but not having the last word get cut off mid-word? I am thinking "cat textfile > something" but I do not know what that something is.
View 1 Replies
View Related
Aug 14, 2011
I updated last night and after a reboot I can get the GDM login but as my desktop loads it suddenly stops and complains of an error and won't load. If I load legacy Gnome desktop with Compiz it loads but ALL the lettering and words on the interface are messed up. By this I mean the letters are upside down and the words are spelt backwards. The mouse menus also work in reverse as in the menus themselves are also upside down and the highlighting moves from bottom to top as I move down the menu. Amusing but not what I want from my computer. There is nothing in /var/log/messages or /var/log/Xorg.0.log that would indicate anything is wrong.
I sooo don't want to have to rebuild, again, because of instabilities in F15 updates.
View 10 Replies
View Related
Jun 28, 2011
I am running OpenSUSE 11.4 on my laptop and I decided to try out the Gnome 3 shell. I really like the design and I like the way it functions so I would like to keep using it, but it seems as though every time I install a new application or package it breaks Gnome 3. This is really frustrating because when I then try to log in it just gives me that cryptic error message that im sure you all have heard about "Oh No! Something went wrong!" or something like that and then it tells me to log out.
I know a fair bit about linux in general, but im no expert by any stretch of the imagination (my experiences have been with Ubuntu, Xubuntu, Linux Mint, and some older distros) so im only used to the Apt-get package manager and I find zypper to not be very understandable. So I don't know if im breaking Gnome 3 every time I install something because of some dependencies not getting installed. My laptop is running a Intel cure 2 duo processor and an Intel mobile graphics chipset (which runs gnome 3 fine normally).
View 6 Replies
View Related
Mar 26, 2010
I have some text files (Just plain text files, not OpenOffice files or anything) and when I try to open them in Windows they are all one line. I think I read somewhere that Linux uses for new lines whereas Windows uses or something... I am using Kate to edit them, and I have a LOT of files to fix so...
View 9 Replies
View Related
Jan 13, 2010
I have to delete a certain line of text from the a textfile via ubuntu's shell scripting.I have done research, and it seems that most people advocate the usage of sed /d option. sed makes does not edit the text file. Hence, most options I discovered involved the use of a temporary variable/textfile and then overwriting the old file with the temporary new file. Is there anyway whereby I can bypass the use of temporary storage containers? I hope there is any magical combination of commands to edit the file directly.
View 3 Replies
View Related
Apr 29, 2010
Assume I have a text file as belowabcdaaaaaaagfgkhahahahahahhahhgfThen gf would be returned
View 4 Replies
View Related
Nov 25, 2010
How can I replace one instance of a word in a text file with a piece of text that spreads several lines ? I know sed or awk is the way to go but don't know that how I can introduce new paragraphs using these tools
View 1 Replies
View Related
Feb 16, 2011
I'm just starting out with shell-scripting, but having a problem with making new text files with the touch or cat > commands.
What I've been doing is touch testfile1.txt
Also, I've tried cat > testfile1.txt (text)
Console reports "bash: text1.txt: No such file or directory. Consfusingly, it works fine in the home-directory. But if I move the file to where I want it, I can no longer view, edit, etc. it.
View 1 Replies
View Related
Apr 28, 2011
I'm trying to be able to Open a text editor without needing an existing file.This is my code:
case $ans in
"Show Today") echo "$(date)";;
"Show Calendar") cal;;
[code]...
View 14 Replies
View Related
Mar 11, 2010
if you execute :
#!/bin/bash
echo "some textstring" >> logfile.txt
then the string "some textstring " will be APPENDED to logfile.txt Is there a redirect way that in stead of appended, the string will be INSERTED at the top of the logfile.txt file ? If this cannot be done by redirecting, what would be the best way to insert the test-string at the top of the logfile ?
View 2 Replies
View Related
Jun 15, 2010
I have a text file that looks sort of like this:
Code:
blah blah blah
tons of unimportant stuff we don't care about
[code]...
View 3 Replies
View Related
Apr 18, 2011
Just using shell scripting, how can I insert text into the middle of a file name. The file has a predictable pattern, let's say 3 letters and 3 numbers and I want to insert text in the middle of those 2 patterns. Say ABC123 is the file name. As a result, the file name should be ABC.blah.123
View 2 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
Feb 3, 2011
Suppose I have a pair of files containing lists. The first file is called contigs.txt and it contains a list that looks like this:
Code:
Contig822
Contig826
[code]...
View 5 Replies
View Related
Mar 1, 2010
I need to write a shell script which can compare two files(text files) character wise. eg. underscore is space.
------FILE 1---------------
A_B_C
D_E_F
G_H_I
[code].....
Actual problem: I need to write a shell script which can give me difference character by character not by line (using comm)
View 4 Replies
View Related
Apr 12, 2010
I am trying to create a shell script, on taking a input file as parameter, which need to do 3 things
1) create a copy of existing file.
2) add a new line to the copied file.
3) strip off all the absolute paths inside the copied file
The first 2 points are straight forward. but i am finding it difficult to acheive the 3rd point. myself not very good with awk and sed. but gave it a shot in vain. For example, the input script consists of below,
PROGRAM=`/usr/bin/basename $0`
HOST=`/usr/bin/uname -n`
echo Start $PROGRAM `/usr/bin/date` |
/usr/bin/tee -a $LOG
The output of the script should look like,
PROGRAM=`basename $0`
HOST=`uname -n`
echo Start $PROGRAM `date` |
tee -a $LOG
View 14 Replies
View Related
Jan 20, 2009
I want to automate this using script.How to automate it?
File1:
s.no# 1 name:aaaaaa
city:abcd
[code]...
View 1 Replies
View Related
Feb 17, 2010
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
View 8 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
Jul 26, 2010
I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
View 1 Replies
View Related
Apr 14, 2011
Is there any way I can switch my desktop shell from unity to, say, gnome-shell? I can switch using other console shell I like (bash, csh, fish, etc.). Assume that there is a stable alternative desktop shell, I should be able to choose, too.
(For console shell, we goes to /etc/passwd. But for desktop, I can't find the way to config.)
View 2 Replies
View Related
Mar 21, 2010
I'm looking for a light-weight text editor for general-purpose composition that can preserve indentations on wrapped lines.
View 3 Replies
View Related
May 11, 2010
Is there a simple text editor for Linux that will let you color or highlight text on demand? Something like gedit or leafpad with color? I know I can probably do this with vi or emacs, but I'm looking for something simple, need not be feature rich.
View 4 Replies
View Related
Jun 17, 2010
The new feature in Gimp 2.7 that attaches basic text formatting options (bold, italicunderline, strike-through) to the active text box is either buggy or just bad design.The text edit buttons are actually being placed on top of the text box (which contains text) instead of off to the side, and that is causing me to not be able to see the text.See screenshot for example:GIMP version: 2.7.1Am I doing something wrong or are others experiencing this too?
View 1 Replies
View Related
Dec 6, 2010
I am looking for a way to keep a log and make if then statements if a line exitsts in the log. I also am looking for a way to make a simple loop, like goto line number, and I also am wondering how to add/remove bits of text from a text file (plugins line in server.properties)
View 5 Replies
View Related
Jan 31, 2010
I just upgraded to the new 9.10. In 8.04 when I went into "Restricted Drivers" it showed something for my video card. Now there is nothing.
I'm trying to play a game (Counter-Strike) and it's just too laggy, probably because I don't have any drivers installed for the video card.
It's an ATI Radeon X-1950 Pro. What can I do?
View 1 Replies
View Related
Apr 30, 2010
we were able to get my officejet g55 and others' g85s working with karmic. the old tricks are not working for me.
i have lucid 64-bit.
View 2 Replies
View Related
May 29, 2010
notice at line 81 it goes rather strange - this goes on for another 9000 odd lines and looks like the set script is broken out and cat-ing to the screen - can't prove this as I've not been able to find the set script that is invoked...e.g.
uname@Sol:~$ set |head -200
BASH=/bin/bash
BASHOPTS=checkwinsize:cmdhist:expand_aliases:extgl
[code]....
View 1 Replies
View Related
Jun 26, 2010
After i tried a lot of mpd.conf tricks, I followed the tips on [url], namely, adding the mpd user to groups pulse and pulse-access. Now, which makes me really happy, MPD can have audio output. Downside: no other program can make sound, I can't make my beats again with lmms etc. The volume icon in the top right is always on mute, when i click preferences, the hardware tab didn't even show a device. Now it does, but nothing comes out except mpd out - and pressing the volume keys will display a notification but the main icon in the bar stays on "---" mute. Can i make mpd just an application on the pulseaudio outputs list, so that it can play nicely with the other guys?
View 1 Replies
View Related