General :: Bash Script Output To Console Without Login?

Dec 30, 2010

i'm looking for a way to output a bash script to the console before login.It should be executed after boot in rc.d scripts with the output on the console0. It is for a asterisk box.This is the script. It use the watch command to output the active calls on the box in realtime.Code:watch "asterisk -vvvvvrx 'show channels verbose'"Btw,

View 6 Replies


ADVERTISEMENT

General :: Unable To Login To Server Through Console But Able To Login Via Network Using Putty?

Mar 13, 2009

I am not able to login to server from console attached to server, every time i enter username & password but it again asks for username & password. But when i try to login to server from remote machine, login happens properly.

View 4 Replies View Related

General :: Highlight Console Output - Any Command / Tool?

Oct 13, 2010

when I use e. g. cat file.txt | grep --color=tty "pattern" I get the pattern I search highlighted. When I want some more context around each hit, grep has the -A, -B and -C parameters. However, I want to display the whole file (or whatever command output) and highlight a certain pattern. Does such a highlight command or tool exist?

View 5 Replies View Related

General :: How To Color Part Of Text Of Output To Console

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

General :: Left Arrow Button Is Not Working In The Output Console?

Dec 6, 2010

I am having a java program which will read characters from console. i have started my program from bash shell and now the program starts and waiting for the inputs. Say I have typed text , "hello". If i try to move the cursor position back wards using the left arrow button it was not working. Instead some junk characters are printed on the console like ^[[C .

hello^[[C^[[C^[[C^[[C^[[C

Below is my program.

public static void main(String as[]) {
BufferedWriter outputWriter =
new BufferedWriter(new PrintWriter(System.out));

[code]....

Note: In windows its working fine.

View 6 Replies View Related

General :: Want Non-GUI Login Screen On Console ?

Oct 20, 2009

Just loaded Lenny, mostly with defaults. I'd like to go back to a command-line login for the console attached to the machine. Of course, I'd like to be able to 'startx' whenever I do want the GUI up.

View 3 Replies View Related

General :: Bash Command Output?

Feb 12, 2011

What does the following Shell program do ??: () { :| : &} ; :Warning: My computer got hung when i tried to execute this.Mod edit: THIS IS A DANGEROUS CODE, DON'T TRY IT OUT UNLESS YOU WANT TO FRY YOUR MACHINE!

View 2 Replies View Related

General :: Troubleshooting - Cannot Login To Server Via SSH/Console

Apr 5, 2011

I got two computers with the exact same symptoms today: Both seem to be alive. They answer pings and they host virtual machines which are working. However, I cannot login via SSH. I get

$ ssh -v obelix
OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /home/mike/.ssh/config
debug1: Applying options for obelix

[code]....

On the console I can switch the ttys and enter my login credentials. After that I see the GNU/Debian Linux welcome message an no prompt. The system seems to hang. I'm able to switch the tty again and login with the same result. (I tried that three times now and I start running out of ttys.) A search on the Internet suggested some ressoucre shortage. How could I release some resoucres than? How could I further investigate the situation before just trying a hard power off?

View 1 Replies View Related

General :: Undo Login Setting From Console

Dec 26, 2010

I'm brand new to ubuntu and very green when it comes to Linux in general.I have recently installed Ubuntu Desktop version 10.10 for my media pc (a friend of mine showed me xbmc, awesome!). I modified my install so that I don't have to enter a password when turning it on.The problem seems to be that when I did the install I chose to encrypt my home directory. Now, since I don't enter a password, the machine spews a few errors and does nothing. I finally got it to boot to a console window however I don't know how to undo what I did from the gui.I'm basically trying to get to System > Admin > Login Window > Security without the gui and "check the box" to require a password on login.Any clue as to which config file this setting is stored in?

View 5 Replies View Related

General :: [bash] Output Of One Script Is Input Of Another?

Mar 20, 2010

Now, I have one script called "defcon" defcon gets the current DEFCON level and outputs it using echo.

Code:

#!/bin/bash
DEFCON=`curl -s http://members.tripod.com/~Swat_25/defcon.html | sed -n '/^$/!{s/<[^>]*>//g;p;}' | sed '/^$/d' | grep '[12345]$'`
echo "The current DEFCON level is $DEFCON"

The second script ("tweet") updates my twitter account.

Code:

#!/bin/bash
curl -s -u USER:PASS -d status="$@" http://twitter.com/statuses/update.xml > /dev/null

What I want to do is be able to update my twitter account with the current defcon status (this is really more of a learning thing than something I actually want to be doing). The original script for tweet replaced $@ with $1, but if I use:

tweet `defcon`

it only uses the first word in the string, similarly if I used $2 or $3.So I changed it to $@. The normal function still works, but typing:

tweet `defcon`

updates twitter with nothing.

EDIT I should mention the /dev/null is there to catch the output of curl, otherwise it won't run silently. It still updates twitter normally with the send to /dev/null

View 1 Replies View Related

General :: Diff The Output Of One Bash Script Against Another?

Jul 6, 2011

I would like to compare the (screen) output of one bash script with the (screen) output of another bash script to ensure the output is exactly the same.The reason for this is that I am receiving a consolidated data feed from an IP address and have moved some of the data feed to a 'new' source IP address. I will turn off the feed from the original once satisfied that the new is receiving the same data. The format of the output from the scripts are exactly the same.

Tried so far
./IDCGRE.sh | grep FX.CK | diff < ./IDCGRE2.sh
./IDCGRE.sh | grep FX.CK | ./IDCGRE2.sh | diff

[code]...

View 3 Replies View Related

General :: Redirecting Output From A Command Using Bash?

May 10, 2011

I would like to get the command and it's output redirected i have tried using the below but my syntax seems to be incorrect .

<<EOF
$(ls)
EOF

View 2 Replies View Related

General :: SQL Command Output To Bash Variables?

Aug 2, 2010

I would like to run a bunch of SQL commands from mysql client in bash. However, I would like to store the output in different variables. E.g.

Code:
var1=`mysql -u[user] -p[pass] -D[dbname] -e "Query1"`
var2=`mysql -u[user] -p[pass] -D[dbname] -e "Query2"`

[code]...

View 5 Replies View Related

General :: Bash - Copy Output Into Clipboard Without Using The Mouse?

Feb 5, 2010

Is it possible to copy the output into the clipboard without using the mouse?

For example, I would like to do something like this:

$ pwd >> clipboard

View 2 Replies View Related

General :: Bash - Get Colored Output When Using Tab Completion In A Terminal?

Feb 27, 2011

Is there a way to get colored output when using tab completion in a terminal? My colors are fine everywhere else so I know that I've enabled a color terminal successfully. Using bash in Ubuntu (10.10).

View 1 Replies View Related

General :: Get Bash Not To Interpret The Output Of A Backquote Command?

Oct 13, 2010

I'm having trouble with a bash script. I have something like this:export VAR=`command`The problem is that "command" can return this: "** NONE **". bash will then replace each of the * by the list of files in the current directory.I want the output to be uninterpreted (i.e. VAR should contain "** NONE **", not "list of files list of files NONE list of files list of files"). It shouldn't be hard but I am unable to figure it out, and I'm not sure how to phrase the problem,

View 1 Replies View Related

General :: Fedora - Boot Direct To Application On Console With No Login?

Apr 19, 2010

I have a need to start an application on bootup on the linux console and I do not have a need for any type of login or security. I do not need any ALT-F1,F2,etc virtual consoles but I would like to allow SSH access via the network port for debugging, loading, etc.

The application is a SDL graphics program running with fbcon as the SDL_VIDEODRIVER if that matters. I'm currently using Fedora 10 and 12 but any distro that supports SDL using the fbcon framebuffer would be acceptable.

View 2 Replies View Related

General :: Copy Previous Output From Bash Terminal To File?

Oct 26, 2010

I know how to redirect the output of a terminal to a file. For example, if I want to list all the files in ~/Documents and output to a file called test.txt, I would do this: ls ~/Documents > test.txt The question is, can I copy the output to test.txt AFTER I have carried out the command? This would mean that I wouldn't have to know in advance whether I want to copy the output to file. I want to do something like this: ls ~/Documents Then this: <bash command for copying standard output to test.txt>

View 2 Replies View Related

General :: Cd Dirname - Use The Output Of A Nested Bash Builtin Call

May 2, 2011

I'm trying to remember how to use the output of a nested Bash builtin call. So `which prog` gives me the path to the program, i'm interested in. Then I would like to get the directory path leading to that program and plug it into 'cd', so i end up in the directory containing the program.

View 5 Replies View Related

General :: Bash And Php Parsing / Not Getting The Data To Output Correctly Into The Rows?

Oct 26, 2010

i am trying to get a script that i'm calling to have information from a sql populate into rows... but i'm not getting the data to output correctly into the rows. can someone please help?

<table>
<thead>
<tr>
<th>Name</th>
<th>Help</th>
<th>Folder</th>
code....

View 14 Replies View Related

General :: Root User Must Not Be Allowed To Directly Login To Service Console?

May 12, 2011

I want to set security regarding with the root user. The root user must not be allowed to login directly to the service console, how will I do this?

View 4 Replies View Related

Ubuntu Installation :: Starts In Console Tyy1 Login Then Goes To Normal Login

Dec 24, 2010

I don't what happened but yesterday I was working normally and then I shutdown the computer, today when I opened ubuntu it took me to tyy1 login screen, I entered my username and password then it took me to the normal login screen with the login drums sound and it wrote on my account (logged in) so I clicked it and I entered my password again and then I got to my ubuntu so what went wrong and how to fix it also I noticed that a new terminal in system tools occurred called Kernel (I didn't add it)

I'm using ubuntu 10.10 on Dell inspiron 1520 with Nvidia 8600GT and 3GB RAM

Important: this happened after update to generic-headers-24

View 1 Replies View Related

Ubuntu :: 10.04 Taking To The Login Console And Not Graphical Login?

May 1, 2010

I just installed 10.04, and its taking me to the console login, rather than the graphical login. When I tried the live cd, the graphical environment was good. But after installation, I dont get the graphical login , so that I can get into the desktop.

I have a ATI Mobility Radeon X1400 card on ThinkPad T60. Everything was working on 8.10, and I decided to install 10.04 and now it doesnt work.

View 3 Replies View Related

Ubuntu :: Redirect Output To A File And To The Console?

Apr 11, 2011

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 Related

Server :: Redirecting Output Of 'sendmail -bv' To Console?

May 3, 2011

When I run 'sendmail -bv', it sends the mail delivery status report as a mail to the root. Is there a way I can redirect this to the console instead of sending as a mail. requirement is to programatically find the mail host of the recipient for which I thought of using this 'sendmail -bv' command. Is there any other better way to find mail host of the recipient

View 12 Replies View Related

Software :: Read The Output In Console By A Function In C?

Mar 7, 2010

How can i obtain the pid of a process, by using a function?Like i know if i write x = system("pidof teste"), x is not the pid of the program teste but it is equal to 0.How can i know the output of a command like that, but make it in a a program in C?

View 1 Replies View Related

Debian Multimedia :: How To Mute MPlayers Console Output

Mar 10, 2011

I'm using mplayer with shell-fm, in my shell-fm.rc I have the line
extern = nice -10 mplayer -really-quiet -ao jack -cache 512 -noar -nojoystick -nolirc -noconsolecontrols -nomouseinput -demuxer lavf -lavfdopts format=mp3 -af-adv force=5:list=resample -af resample=44100:1:2:extrastereo-1.5 -
This to me at least produces a pleasant audio output but despite the -really-quiet option mplayer is still outputting text, generally something like
[mp3 @ 0xa3f5380] max_analyze_duration reached
I've also tried the -msglevel all=-1 option and had a play with the MPLAYER_VERBOSE environmental variable, all with no joy.

View 6 Replies View Related

Ubuntu Servers :: Get Console Output Over A Serial - COM - Port?

May 28, 2011

Is there a way to get console output over a serial (COM) port? I have a box that I use as a NAS, DNS, DHCP and mt-daapd server, I don't have a spare monitor and it is not worth buying one just to use it once or twice a year.

I found this guide [url] but it doesn't work with Natty

View 3 Replies View Related

Programming :: Read Console Output From Remote Server?

Jan 20, 2009

when the user clicks a button (assume war application) and the action'system.out.println' a message, how can I *remotly* read this message (read the message from a different computer instead of the server)?when I use the eclipse, I can read it from the console but if I'm in adifferent location, how can I see this message remotely?I'm thinking about remote debugging (JPDA), however, it's very difficult to configure in order to make JPDA run. I tried based on tutorial of google search, bug failed.I wonder if remote debugging can actually solve my problem. If not, is there any other to solve

View 1 Replies View Related

General :: Root Login Directly Into -bash-3.2#?

Mar 22, 2010

i am using fedora 10 while i login as a normal user its working fine username@hostname while i login as a root user it goes directly into -bash-3.2# if i check pwd it shows /root till now i am not facing any problem as i am using as a normal user but how can i change -bash-3.2# to root@hostname which file and where to edit

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved