General :: Formatting The BASH Command Prompt?

May 6, 2010

I would like to change the formatting on my BASH prompt from this:

anon@machinename.domain.poo:~/some/very/annoying/long/path$

to something like this:

anon@machinename.domain.poo:~/some/very/annoying/long/path
$

The idea is that I would be able to type a reasonably long command on one line without it wrapping to the next line so quickly.

View 2 Replies


ADVERTISEMENT

Ubuntu :: Getting Odd Bash Prompt Formatting?

Aug 19, 2010

I've run into something odd:

Code:

jdougher jdougher> cd
jdougher jdougher> echo $PS1
u W>
jdougher jdougher>

For some reason, rather than replacing $HOME with "~", my prompt just displays the name of my home directory.

View 2 Replies View Related

Red Hat :: Command Line Prompt But Not The Correct Bash Prompt?

Feb 2, 2011

I'm running Red Hat Linux 5.4 on HP DL580 server with 16 processors and 64 GB of RAM. I'm connecting to the server remotely through SSH. after entering the password, it takes time to return the command line, if I click ctrl+c during this time, I'll have the command line prompt but not the correct bash prompt (I have to run bash to pass to my correct prompt).I tried to install Apache on the server, ./configure took 4 hours to finish instead of 1 or two minutes, Oracle installation same behavior. Server Disks are mirrored using RAID controller.

View 6 Replies View Related

Ubuntu :: Running A Command In The Alt+F2 Prompt Possible In Bash Scripts?

Jan 5, 2010

Is running a command in the Alt+F2 prompt possible in a bash script?I need this for a launcher for gnome-shell.For it I have written a little script to check if the process gnome-shell is alive and act accordingly.The script works fine, I just don't know how to write "debugexit" to the Alt+F2 prompt, as that is the only decent way I have found to shut gnome-shell down and going back to gdm desktop smoothly.

View 1 Replies View Related

General :: Formatting Op Of Awk Command?

Mar 7, 2011

I have an command to read inputs from file2 and replace the content in file1. Issue is that the op is coming in a single line as gsub and split functions don't recognize new line characters.

Code:
awk 'NR==FNR{gsub(/input./,""); split($0,a," = ");b[a[1]]=a[2];next} {gsub(/@/,"");for (i in b) gsub(i,b[i])}1' $t2 $t3
This gives belwo op:

[Code]....

View 14 Replies View Related

Ubuntu Installation :: Grub Rescue Prompt After Formatting?

Mar 28, 2011

i have a dual booting the first one being ubuntu 10.04 within which i have installed windows7.Unfortunately,i've formatted that part of my hard disk in which i've had ubuntu. Now my problem is i cant load into any of the two os and i dont want to loose my vital data in the system.I've tried booting using the live CD but in vain.i desperately need my info in my laptop.

View 3 Replies View Related

General :: How To Minimize Bash Shell Prompt

Oct 26, 2010

Currently the terminal prompt looks like this:[karlis@karlis-desktop current_folder]$How can I minimize the prompt, so that it only shows $ or # without extra info in square brackets?I checked the preferences for the default Gnome-Terminal and Terminator - there are no settings for this. It is pretty hard to use terminal when working in directories with long names.

View 1 Replies View Related

General :: Change Bash Prompt On Ubuntu?

Feb 2, 2011

I have one account on an Ubuntu server with the correct PS1 variable and I want to make one of my other accounts on the same server have the same PS1 variable, so that my prompt on this new account (when I ssh into the machine) is the same as the original account.

Is there a way that I can pass this PS1 variable between accounts so the prompt is the same?

I have tried printing it out, copying the output, and then reassigning it to PS1 on the new account, but it just doesn't work.

Here is what is printed when I type echo $PS1:

[e]0;u@h: wa]${debian_chroot:+($debian_chroot)}[�33[01;32m]u@h[�33[00m]:[�33[01;34m]w[�33[00m]$

I want to assign that prompt (shown above) to my new account.

View 2 Replies View Related

General :: Bash Prompt Loses Characters?

Apr 17, 2011

After writing a new prompt for Bash, I noticed that one character of my commands were being lost when it wrapped to the new line. Here is an image of the example (I typed 1234567890 over and over):

Here is my $PS1

PS1="
[[e[0;90m]d [e[0m]] [[e[0;90m]$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, $(/usr/bin/du -sh | cut -f1)[e[0m]
[[e[0;36m]#[e[0m]] [e[0;95m]u[e[0;90m]@[e[1;92m]h[e[0m]: [e[1;34m]w [e[1;30m]$[e[0m] "

What have I done wrong?

View 1 Replies View Related

General :: Bash Prompt Doesn't Change From $ To # For Su

Jan 25, 2011

I'm trying to change the bash prompt and based on the man pages $ should show a $ which changes to a # for a SU. However, this doesn't happen on my machine, it's $ for both user and SU.The line in .bashrc is:export PS1="u@h:w$"

View 7 Replies View Related

General :: Get Bash Prompt Right After Logging Into A Server?

Feb 28, 2011

Everytime I log into the linux server at my workplace (I use putty), I don't get the bash prompt right away. I need to execute the command 'bash' to get it. Anyway to make this automatic? e.g.

Code:

host:1>
host:1> bash
user@host:~$

View 17 Replies View Related

General :: Bash Prompt / Looks Fine Initially, But There Seems To Be A Hidden Error?

Jun 1, 2011

I've written custom prompts for several boxes but this one has an error I just can't identify and need a second set of eyes to help solve it.

I've set the following as my prompt: PS1="[e[30;42m]u@h[e[0m][e[30;47m] #][e[0m][e[32;1;40m]w>[e[0m] "
(hostname/un obscured & image enlarged slightly to make it easier to read.)

Everything looks fine initially as you can see here:url

1- It sets the username@host in back on green text.
2- It then changes to an off-white an prints the command number for the terminal.
3- Next, changes to a green on black font and prints the working directory.
4- Finally is prints a ">" character and a space.

The problem occurs when I try to "up arrow" to reuse and/or edit a prior command. It prints the prior command fine, but if I arrow over to edit the command sometimes the first character can not be deleted from displaying as you can see in the following composite screen-shot

url

Here I did a simple ps and piped it through grep. After getting the output, I up-arrow to repeat the command. As you can see by the second section the cursor only goes back to the "s" in ps. The "p" can not be deleted. Hitting enter just displays a new line, so the "p" was just a ghost being displayed and not really there.

View 2 Replies View Related

General :: Configure Bash Prompt To Show Current / Parent Directory Only

Oct 15, 2010

I would like to modify Bash Prompt so it does not show the whole $PATH but just the current and parent directory. I am using Ubuntu.

View 3 Replies View Related

General :: Read A Text File And Ftp Files Using Bash W/out Leaving The Ftp Prompt

Oct 9, 2009

I have a script almost working except for 1 thing. What I'm trying to do is read a file that has the files that need to be FTP'd using a bash script. I have everything working except the reading of the file. It works outside of the ftp script I've wrote but once I put it in the FTP script it doesn't.

Here's the Script:

#Here's where the problem is that I know of

I've been playing w/ the exclamation points to see if that could be the problem, but so far no luck.

View 6 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

View 6 Replies View Related

General :: How To Use Command Prompt To Open Them

Sep 6, 2010

After contracting malware on Vista i decided to switch over to Linux and chose to start of with Ubuntu because of the graphical interface. that being said, you have no doubt inferred that i have no coding experience. basically i was hoping to find some nice tutorials and sites for Ubuntu. Also, i did downloaded the suggested programs and patches but im still experiencing problems with Adobe,flash, and and opening .exe files. for the latter, when i click on .exe files it is equivalent of using explorer on windows so i was wondering how to use the command prompt to open them. supposedly linux is susceptible to malware so if you could please suggest a anti -malware program.

View 14 Replies View Related

General :: Finding IP Address Using Command Prompt?

Apr 4, 2010

I'm looking for a way to get my IP address using the command prompt in Linux. I know when you type "ifconfig" you can get your local IP address (i.e. 192.168.0.103), but I'm looking for my IP address that I get from my ISP. How can I get this from Linux without having to visit some website?

View 3 Replies View Related

General :: Export Is Not Working On Command Prompt?

Aug 26, 2010

The command export is working inside a shell script, but when I type it at the command prompt / terminal it doesn't work. "export: The command not found" error is displayed instead.

I tried this:

cat test.sh

Code:

abc=123
export abc
echo "Exit status of export abc: $?"

[code]....

I tried it before on my RHEL system and it was working. I have checked

Code:

echo $PATH

which is okay. What could be the problem?

View 7 Replies View Related

General :: Cannot Access Sda1 Through Command Prompt

Apr 7, 2011

I am trying to access another partition on my drive through the command prompt. I have tried to access it through the /dev directory but when I input "cd ./sda1" or "cd /sda1" it says no such file or directory.

View 8 Replies View Related

General :: Command Prompt Missing In Terminal

Jul 15, 2010

Something unfortunate just happened. I was editing the bash file from my terminal and changed a source. After this I was no longer able to input commands for interpreting in the terminal.

View 13 Replies View Related

General :: Dynebolic Showing Only Command Prompt?

Mar 18, 2010

I am trying to install Dynebolic 2.5.2 on my system.I copied the dyne/ folder into root of my partition(ie /) and updated grub as follows:

title Dyne
root (hd0,0)
kernel /dyne/2618ckld.krn root=/dev/ram0 rw load_ramdisk=1 max_loop=64 vga=788
initrd /dyne/initrd.gz

But on rebooting into dyne ,I get a command prompt .A part of what i saw is given below:

root:[!] you can safely reboot now or wait to enter a maintenance shell.
VOLATILE MODE : : opening a shell in ramdisk.
you are entering a maintenance sector whatever that means

[code]....

View 2 Replies View Related

General :: Executing A Program From Command Prompt?

May 27, 2011

I'm trying to run an application from the command prompt. I've set the path in .bashrc. My executable file and all other files needed by it are saved in the same directory as the path. When I enter the executable name to run it, I get an error message saying that the command is not found.

View 14 Replies View Related

General :: How To Pass Argument From Command Prompt?

Jan 5, 2011

when I am running the script below,it performs on whatever logfile u type ,i.e, ./scriptname logfilename.But how do I convert it into a function and then call it from another script.I mean how do I prompt the user to enter a logname and then capture the name in the function and when calling this function from another script how do I pass the parameter.

View 3 Replies View Related

General :: Start Tomcat Using Command Prompt?

May 9, 2011

Friends currently we are accessing tomcat manager using web page ]

http://localhost:8080 ,

is it possible to start the tomcat manager using command prompt!

View 4 Replies View Related

General :: Connect Sqlplus Through Command Prompt

Nov 29, 2010

I am working as oracle DBA on 10g . Till last day I had worked on windows platform. Now my company want me to work on Linux platform. I am first time using Linux dont know A,B,C of Linux . I want to connect sqlplus through linux command prompt. I have exported enviornment variable of oracle but I am getting permission denied Below mention steps I ahd followed . Please help me to solve it

[oracle@bhel1 mj]$ ORACLE_SID=V7;export ORACLE_SID
[oracle@bhel1 mj]$ ORACLE_HOME=/usr/lib/oracle/v7/app/oracle/prod
ver;export ORACLE_HOME
[oracle@bhel1 mj]$ PATH=$ORACLE_HOME/bin:$PATH;export PATH
[oracle@bhel1 mj]$ NLS_LANG=AMERICAN_AMERICA.AL32UTF8;export NLS_
[oracle@bhel1 mj]$ LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_P
LIBRARY_PATH
[Code]....

View 1 Replies View Related

General :: Run One Command As Different User Without A Password Prompt?

Aug 4, 2010

I need to run one command as different user with out a password prompt.

I did this

Code:
one localhost= (two) /usr/bin/whoami

This work but it prompts for password. Is there a way that can be done with NOPASSWD option ?

View 1 Replies View Related

General :: View Cookies From Command Prompt?

Mar 11, 2011

I was curious if I would be able to view cookies from a command prompt when ssh'd into a machine. On a test machine running fedora 13, I found that the cookies were stored in a cookies.sqlite. I made sure that all instances of Firefox was closed and attempted to view the file running the following command

sqlite3 cookies.sqlite

It loaded but I was unable to run view any of the information because the database was locked? There were no instances of Firefox running and I check to make sure there were no services of Firefox running as well. Am I doing something wrong? Is this not the correct way to view cookies from the command line ? I have tried google searches and has since been unable to come up with anything.

View 4 Replies View Related

General :: Command Prompt Ftp To Ftp Server Running On Windows?

Dec 27, 2010

I am using on Windows Vista, Filezilla server. I have it set up to be accessed via outside IPs and when I use a client on the IP I have it connects normally using Filezilla client. On the same machine I have Ubuntu running in a virtual box and when using filezilla client in there it works fine. Now I want to try the command prompt. So I do the ftp xxx.xxx.xx.xxI enter the name and password and i get the ftp command prompt, but the commands are not working properly. when trying "ls" or "cd" these commands do not work. "cd" tells me that the current directory is "/" root, but this does not make sense in the windows operating system. Now the filezilla client is taking the user in the application window directly to the root folder of the permitted filespace granted to that user. How can the same be done from the command prompt, if there is a way? It is as if the command prompt takes me to the root which does not exist or even have correct permissions to move in. Is there any way to be taken to the correct directory directly, or move there especially when the slashes are the wrong way around etc?

View 1 Replies View Related

General :: Uploading Files To S3 Account From Command Prompt?

May 6, 2011

I've got several large files sitting in my linux hosted account that I need to upload to my S3 account. I dont want to download them first and then upload it into S3. Is there any way I can "upload" it via the linux command line environment? Or access it via a website working with lynx?

View 1 Replies View Related

General :: Printing A PDF From The Command Prompt Doesn't Work?

Oct 29, 2010

I have a PDF that I built using BIRT, and that works fine. At this point I'm trying to print it using lpr or some other command. It seems as though I should just be able to type lpr invoice.pdf and it should print to the default printer. However, lpstat -t shows "Empty print file!" for the printer, and the printer doesn't do anything, let alone print the file. lpr -l invoice.pdf prints the file, but unformatted - just a bunch of characters and whitespace on a seemingly infinite number of pages.

View 2 Replies View Related







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