General :: Removing The Escape Characters From GNU Screen's Screenlog.%n?
Jan 22, 2010
Is it possible to remove the ESC sequences in GNU Screen's output file? Things such as colours, tabs and other escape characters make their way into the log files and become difficult to decipher.
I've tried Dr. Google & Co. as well as reading the manual, but haven't been able to find anything suitable.Perhaps I've overlooked something?
View 3 Replies
ADVERTISEMENT
Aug 28, 2011
While modifying the definition of my PS1, I saw that "[" and "]" markers should be added to help bash to compute the right display lenght. Many exemples on the web do not use them or even mention them.I searched for a solution to add them automatically, like with sed, but I didn't find any example.Are they still needed and is there a recommandation not to use sed to define PS1?
View 1 Replies
View Related
Oct 20, 2009
Need little advice running this command.
watch -d 'ps aux | awk '{print $4" "$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr | head'
I get this error message from AWK. awk: cmd. line:1:
{print awk: cmd. line:1: ^ unexpected newline or end of string
I have tried all the usual by trying to escape the single and double quotes in the command but same result. The end result should be the a listing of memory hungry processes that are scanned every 2 seconds (watch default value).
View 2 Replies
View Related
Feb 6, 2011
I wish to replace a new line with br (html) but it doesn't seem to work
Code:
message=$(echo ${FORM_message} | tr '
' '<br />' )
what it gives me seems to be ... b...? I am also having problem escaping hash sign in cut command:
Code:
list=$(echo "$line" | cut -d'#;#' -f1) ;
my intention is to split the line with "#;#"
View 5 Replies
View Related
Mar 6, 2010
Is there tool or a regexp that can convert shell escape characters to HTML code?
As an example, here is a logfile from GNU screen:
Which I would like to convert to something like this:
And send as HTML e-mail to an e-mail address, to archive my work.
Here is a related question, which shows how to convert it to regular text, but it would be nice to convert to HTML and not just throw the escape characters away.
View 1 Replies
View Related
Nov 11, 2010
My goal is to send escape characters from Linux to make scanner's LED blink. I've started with a simple "beep" command:
echo -e "�7"
and it worked. We are using WaveLink emulator and the escape sequences for the LED are
echo -e "�33%150;200;5L"
Linux returns me this: 150;200;5L
So, it doesn't work. What am I doing wrong for the LED sequences?
View 1 Replies
View Related
Nov 2, 2010
My question is: what option can I set in vim to see the colouring inside the editor as I would get it in my terminal (and switch off any additional syntax highlighting)?
View 1 Replies
View Related
Apr 6, 2011
dhclient does not strip or escape shell meta-characters
Summary: dhclient doesn't strip or escape certain shell meta-characters in dhcpd responses, allowing a rogue server or party with with escalated privileges on the server to cause remote code execution on the client.
CVE:
ISC dhclient did not strip or escape certain shell meta-characters in responses from the dhcp server (like hostname) before passing the responses on to dhclient-script. Depending on the script and OS, this can result in execution of exploit code on the client.
CVSS Score:
For more information on CVSS scores, visit [url]
Workarounds:
On SUSE systems, it is possible to disable hostname update by setting DHCLIENT_SET_HOSTNAME="no" in /etc/sysconfig/network/dhcp.
Other systems may add following line to dhclient-script at the beginning of the set_hostname() function:
In environments where filters/acls can be put into place to limit clients to accessing only legitimate dhcp servers, this will protect clients from rogue dhcp servers deliberately trying to exploit this bug.
However, this will not protect from compromised servers.
Active exploits:
Solution:
Upgrade to 3.1-ESV-R1, 4.1-ESV-R2 or 4.2.1-P1. [url]
No patch is available for 4.0.x as it is EOL. Anyone running 4.1.x should upgrade to 4.1-ESV-R2.
Acknowledgments:
Revisions:
View 1 Replies
View Related
Sep 1, 2010
I've got a basic script, which parses data from a text file and performs actions based on that data. Here is my code:
Code:
dsrc="/home/russellm/sites/"
ddst="/home/russellm/othersites/"
while read SiteID
do
if [[ ! -d "$ddst${SiteID:0:1}" ]]
then
mkdir "$ddst${SiteID:0:1}"
fi
mv "$dsrc${SiteID:0:1}/${SiteID%*}" "$ddst${SiteID:0:1}/" | tr -d '
' done < sites.txt
The text file came from a windows system, and contains those return characters (). I 'could' just run the whole thing through tr and then run the script on the new data file, but I'm looking for a more elegant solution. As the code above shows, I'm trying to pipe the mv command though tr in order to remove the return character - but it's not working. I can't get this to work with sed either, so I know I'm doing something wrong. I also tried to remove it using ${SiteID%} - but that also failed. The characters don't show up in an echo, just when executing a command.
Output example (emphasis mine):
Code:
mv: cannot stat `/home/russellm/sites/B/B23467324
': No such file or directory
I'm tempted to just convert the file once and call it a day, but you know what it's like. To be honest, I'm starting to suspect that there are no return characters, and that I'm going about this wrong.
View 4 Replies
View Related
Dec 30, 2009
Is there any way to disable the escape sequence in screen, so the user can't escape and run commands? we have a program that runs under user "shop". We want to wrap it in a screen session, and use .screenrc to set it multiuser and allow the "dev" user to connect to it. Then, if the "shop" user loses his connection, the session will stay running, and then the "dev" user can attach to the session and end it. We want the "shop" user to be unable to enter any "screen" commands.
View 2 Replies
View Related
Dec 30, 2010
I have the following in my .screenrc file
hardstatus string '%{= kw}[%{r} %d/%m/%Y %C %A %{w}] [%= %{= kw}%-Lw%{= kW}%{r}%n:%t%?%?%{= kw}%?%+Lw%?%?%= ] [ %{r}%l%{w} ]%{w}%{w}'
and the statusbar shows up as
[ 30/12/2010 8:24 PM ] [ 0$ bash 1-$ bash 2:bash ] [ 0.00 0.03 0.04 ]
I want it like this instead:
[ 30/12/2010 8:24 PM ] [ 0:bash 1:bash 2:bash ] [ 0.00 0.03 0.04 ]
View 1 Replies
View Related
Apr 5, 2010
My grandson got a little free time on my login screen. When I got back I found the right half of the screen was covered with a cascade of zoomed copies of the regular login display. Each layer of the cascade larger that the previous as one moved right across the screen. When I reboot it is still there. I have tried various hotkey combinations in the hopes that I could change this, but with no result. I have looked for files which might have such a pattern saved. I found a file /usr/share/gnome-session/session-properties.ui with a promising name and inside was a series of 'child' entries, but removing all but the first child entry changed nothing. how to fix it?
View 4 Replies
View Related
Aug 12, 2010
sometimes there are one, sometime there are two exchanges in this log file. the 100= is the stock exchange- if there are two, they are seperated by a comma. i understand how to escape a comma in a regex, but I am having trouble with combining it.
35=8 39=1 38=1000 32=13 14=754 31=1.11 44=1.1 100=AMEX,ISE
35=8 39=1 38=1000 32=151 14=205 31=1.1 44=1.1 100=AMEX
35=U 39=2 38=1000 32=45 14=184 31=1.1 44=1.1 100=AMEX,ISE
[code]...
View 11 Replies
View Related
Sep 17, 2010
I need to occasionally touch a file with the current timestamp as the filename. I would do so this way:
touch `date "+%Y-%m-%d_%H-%M"`.txt
However, I'd like to define an alias for this. When I try adding to the bashrc this:
alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"
the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...
How can I get the command to expand only when I call the alias? Or must I use a function for this?
View 1 Replies
View Related
Jan 17, 2011
Usually when I need to replace some lines in a file, the first tool that comes to mind is sed -i:
sed -i 's|tool:.*|tool: some-tool|'
However, it's inconvenient when there are . characters in the replacement string:
sed -i 's|host:.*|host: 127.0.0.1|' Is there a better tool for this case?
View 1 Replies
View Related
May 3, 2011
i have a cd that shows you an empty directory unless you mount it for the joliet extensions - specifically 25 2f 40. It uses wide characters with the high half null.
View 3 Replies
View Related
Feb 7, 2010
I got a new computer yesterday, a 64-bit Asus.I replaced the power supply and the graphics card immediately. I booted the computer up with a spare 20"idescreen monitor on a portable desk to install Ubuntu and make sure all was well with the newly installed power supply and graphics card.It worked perfectly.I moved my old tower out from its slot under my desk and put the new Asus tower under there. I plugged it into my 23" widescreen monitor and booted the computer.Ubuntu (9.10) boots just fine... but the login screen is all boxes!! There are no characters, just little white boxes. I can put in my password and log in. Once logged in the system is fine - all characters display normally from within Ubuntu.
View 2 Replies
View Related
May 13, 2011
Compaq N600c w/ Slack 13 loaded...it's an older workhorse that began behaving oddly after the user dl'd a background image for her desktop...on login, the laptop would spawn hundreds of terminals once producing a load avg of 40.5 -never seen that before- as well on shutdown and startup I start seeing the appearance of the following characters ^[[[D repeated hundreds if not thousands of times on the screen, boot and shutdown will progress to completion but it's unintended behaviour, therefore suspect in my mind.hd thorough self-test passed and memtest is not showing errors on it's second pass
View 3 Replies
View Related
Aug 8, 2010
Is there a way to print a transcript generated using script that is coloured using ansi escape sequences while preserving the colours?
I am on OS X 10.6, but any tool that works on OS X or on Linux that can print or create a pdf file will be extremely helpful.
View 1 Replies
View Related
Feb 25, 2011
Fedora 14
When I started I took the defaults and ended up with Evolution.
I have never managed to get it set up to send. It and godaddy are on diffferent planets.
Having used Thunderbird in the past, I downloaded it and it automagically set itself up to send and receive.
So now I use Thunderbird - BUT - when I click on a link in an html page - the mailto macro sends me to something other than THunderbird - perhaps Evolution - and nothing gets sent.
So how do I tell the system that when i click a mailto in firefox I want Thunderbird?
PS I think I found it. In firefox - edit - preferences - applications tab - mmailto - it said Evolution. I changed it so say /usr/bin/thunderbird - will now test it.
YES - Seems that asking a question triggers my brain on how to resolve it. Sorry to waste your time.
View 1 Replies
View Related
Jan 17, 2011
I'm using Slackware 13.1.
Whenever I logout of KDE and go back into console mode, the characters at the console screen become unreadable gibberish. Is anyone else having this problem?
I can ctl+alt+F? to work at another console screen, but the ctl+alt+F1 screen remains unreadable until I reboot.
View 4 Replies
View Related
Oct 29, 2010
I would like to replace gvim with vim in the terminal. One of the nice things about gvim is that it is able to display text using italics.
Vim allows setting an ANSI escape code for italics (e[3m), but this does not work in gnome-terminal. Is there a terminal emulator that supports the ANSI escape code for italics?
View 1 Replies
View Related
May 2, 2011
I am trying to use sed command to repalce one string with other but somehow replacement string contains forwards slash hence getting the error statement garbled!
[Code]...
View 4 Replies
View Related
Jul 8, 2011
What command could I use in terminal to delete all ASCII characters? That is, delete a-z, A-Z, 0-9, and all punctuation? I have a file containing Chinese characters, and I want to remove everything else and leave just the Chinese.
I can use grep to leave only the lines that have Chinese in them, but this still leaves a lot of non-Chinese stuff on those lines. Does anyone know how I could actually remove everything that isn't Chinese?
View 4 Replies
View Related
Jan 18, 2011
I installed KDE but decided to remove it after a while as I wasn't using it and its application were redundant on my Gnome desktop. I followed Psychocats' guide for "pure Ubuntu" but after rebooting, Ubuntu just hangs on the loading screen (or during 'checking battery state'). I tried booting in recovery mode but I'm unable to navigate the menu: when I press a direction key it alternates between the menu and the Ubuntu loading screen. Several other keys do the same thing, while the rest do nothing.
View 5 Replies
View Related
Jun 16, 2010
I have my OpenSuse 11.1 box set up with utf-8, however, every time I try to open a file with utf-8 characters with vi it can't handle those characters properly.
View 6 Replies
View Related
Jun 11, 2011
When openSUSE was installed, GRUB information was installed in the Extended partition rather than in the MBR.
I have a triple boot system: Windows XP Pro, openSUSE, and another popular distro on Linux. The other distro put GRUB info in MBR. Now when I boot up it goes to member first. If I select openSUSE, the GRUB info in the extended partion is accessed and a 2nd selection screen is displayed.
I tried reloading the GRUB data for openSUSE selceting to install it in MBR but this does not seem to work.
How do I get rid of the GRUB stuff in the extended partition so that the 2nd GRUB screen does not get displayed?
View 6 Replies
View Related
May 31, 2011
I know a bunch of commands and I am comfortable using the terminal, I even set a powerpc server but I can't figure out how to remove epiphany on this new computer I'm setting up. I didn't install anything with tasksel. I installed gnome and xorg afterwards... I load it up and 'startx' just fine. then I check around for the programs that were installed. I lik'em gimp, lot's of utilities. gedit. anyway I find epiphany, which I have already established that I dislike, I immediately go to the root terminal (another nice program that comes with gnome) and type apt-get remove epiphany-browser-data the output says it will be deleting gnome... however I have researched and found these are simpy meta packages that don't really matter.... however under the section that states all the packages that will be removed by autoremove there is a huge list... I doubt these packages are safe to remove. how to remove epiphany without removing a huge amount of probably needed software
View 14 Replies
View Related
Feb 27, 2011
what i did was, remove evolution mail from synaptic, what i wanted to do was just remove the indicator applet from the task bar. i read a bunch of bad stuff about removing evolution from synaptic vs just removing the applet.
im worried. did i break anything or put my security at risk. after, i used a command (older) (sudo apt-get install ubuntu-desktop)to install ubuntu desktop. because i thought that it would fix evolution. then i went to synaptic and installed a package called evolution. i rechecked evolution in applications menu. however, i notice that i have both a checkable evolution and two evolution icons. nothing 'seems' broken. im not sure if it ever was. and evolution calender pops up as normal, as does the the installed plain evolution. they both seems to be an exact copy of the other.
all i really wanted to do was remove the indicator applet. did i make a serious mistake. since ive had ubuntu, ive reformatted a lot because i was worried i made a mistake of some kind. however now im into the more "make a mistake and fix it stage' as im pretty happy with my current desktop and have worked hard to customize it. the command, sudo apt-get remove indicator-messages removed the mail icon. i still am worried that i broke something, or put my security at risk. also, now i have two mail icons. evolution mail and calendar, and another just called evolution.
View 1 Replies
View Related
Mar 20, 2010
Ok, so I find myself ripping audio CDs frequently, which I then lame to mp3's to put on my media player. I usually define the --ta and --tl (artist and album) ID3 tags and batch encode each album, but don't bother with the track tags as I'd have to do each one seperately.
So, I'm working on a script to do all this for me, extracting info from 'pwd' etc. to fill in the blanks for --ta, --tl and --tt (track name). All is working well, except that I can't get sed to pass on the "" character to lame to escape spaces.
Here's what I've got so far: (trouble spot is bolded - no need to pay attention to the rest of it)
Code:
All this does is pass a 'space' on to lame, which it takes as an invalid argument.
View 10 Replies
View Related