Software :: Echo Or Search Through Terminal Output?

Jun 16, 2011

if i will sound stupid but i can't find a command that would echo output of some command. Let's say that i want to echo the third line of ls -a. I know of the tail command but this command starts from behind.

View 4 Replies


ADVERTISEMENT

General :: Make Gnome Terminal App Support Output Search?

Oct 2, 2010

Using a default terminal and bash, there is no functionality to search the standard output of commands.

One can gain such functionality using other tools, like emacs shell or screen, but I am wondering why such a useful feature is missing, I do remember a simple C-F used to work in terminals.

Is there a way to make the Gnome terminal app support output search? or is there a better terminal app that support searching output natively?

View 5 Replies View Related

General :: What Does Echo $$ Give As Output

Nov 28, 2010

What does echo $$ give as output?

View 3 Replies View Related

Ubuntu :: Echo Command To Output First Argument

Nov 5, 2010

In a script, when I enter "echo $1" the first argument is outputted. When I enter:
a=1
echo "$$a"

The output is just "$1", not the first argument. If I enter:
a=1
b=$$a
echo $b

The output is still "$1" and not the first argument. How can I get echo to output the first argument without use "$1" directly?

View 4 Replies View Related

Programming :: Echo Two Command Output In The Same Line?

Jan 25, 2011

I try to write script and echo two command at the same line .

echo "A"
echo "B"

How can I pipe above two command at the same line in text file . So, in the output text file , you can see below ? Code: A B not Code: A B

View 4 Replies View Related

Software :: Echo Two Command Output In The Same Line?

Jan 24, 2011

I try to write script and echo two command at the same line .

echo "A"
echo "B"

How can I pipe above two command at the same line in text file . So, in the output text file , you can see below?

Code:
A B
not

Code:

A
B

View 9 Replies View Related

Fedora :: Echo Exit Status After Command Is Run In Terminal?

Feb 19, 2010

command will just execute and exit with a status of "0" -"Every command returns an exit status (sometimes referred to as a return status ). A successful command returns a 0, while an unsuccessful one returns a non-zero value that usually may be interpreted as an error code. Well-behaved UNIX commands, programs, and utilities return a 0 exit code upon successful completion, though there are some exceptions."[URL]With the command . . .

Code:

# dosfsck -v /dev/sdb

it could be very helpful (and decide my next move) to see the exit code as 0, 1, or 2 . the man page suggests the command exit code will specify if the message I get - "Cluster size is zero" (I think it is a "1")is a recoverable or fixable error by the utility. or is non-recoverable - a pretty nifty feature if I understand this right. [URL] is there anything like this script COMMAND_LAST used in the following link. [URL] that can be entered in the terminal window after - or at end of - my dosfsck command or any command. just to see if it has a 0, 1, or 2 status ?

View 2 Replies View Related

Ubuntu :: Output Files Containing Search Term?

Feb 25, 2010

I would like to search for a term within a batch of text files and copy the files containing that term to a folder.

I've read the man pages for Grep, Ack-grep and looked through nautilus, dolphin, midnight commander as well as tried beagle, tracker and google desktop (and looked throught these forums).

I can do this function easily with xp's wagging dog in the Windows search, but would like to find a way in Linux.

View 5 Replies View Related

Programming :: How To Transfer Search Output Between Two Server

May 25, 2011

I want to search for 1 file (say test.txt) on first server and all the output of this search to be greped as per my requirement and then transfered on the second server at the same location where they were on first server.

E.g.
output of search of file (test.txt) >> output.txt
/tmp/test.txt
/home/cpan/test.txt
/opt/cpanel/test.txt

Now I want to grep this output to only related to cpanel,
for f in 'cat output.txt'
echo $f | grep "cpanel"
if [ $? -eq 0 ]
then do scp.
But I am bit confused here, as in how to use scp command here.
scp $f root@second_server:/$f ?

View 3 Replies View Related

Programming :: Used The Output Of Search To Copy In Another Destination?

Dec 20, 2010

i want to used the output of search to copy in another destination examlpe. fine /home/* mtime -1 i want to used the output of the find command to copy an another destination

View 4 Replies View Related

General :: How To Redirect A Terminal/tty Output To Other Terminal/tty

Dec 14, 2010

hello
I tried to find a good subject but it was the best of mine, anyway I'll explain it here.
some time I do some thing like installing a new application in Linux terminal of my office PC but it take a long time and I have to go home during its installation or configuration process that it is not good to cancel it.My current solution is abandoning the process until next day. I wanted to know is there any way to redirect an input and out put of a terminal to another one, if it works I can continue my abandoned process by ssh to my Linux office PC and redirect that terminal to my new remote sshed terminal from my home.

Thank a lot for any help.

View 4 Replies View Related

General :: $echo Cat Vs $cat Echo / Difference Between Them?

Dec 16, 2010

What is the difference between

$echo cat
$cat echo

View 1 Replies View Related

Ubuntu :: Piping Command Output Into Grep As Search Term?

Nov 11, 2010

I want to pipe the output of a command into grep as the search TERM, rather than the text to be searched, like this for example

Code:

cat /var/log/auth.log | grep date "&b &d"

so that I only see the lines in auth.log for the current day...but obviously that line doesn't work.... is there a way to do this with grep, or even another command?

View 4 Replies View Related

Ubuntu Installation :: Cp: Cannot Stat '/boot/grub/search.mod': Input/output Error?

Jan 30, 2010

This is what I get when following the instructions to fix grub. I type in "grub-install /dev/sda" and that's the error I get.I'm trying to put Ubuntu or Mint on a Dell Mini 9 with 16gb ssd, but no matter what I do I cannot achieve this goal

View 4 Replies View Related

Ubuntu :: Starts Conky But Also Shows "output To That Terminal So You Can't Do Any Other Commands To That Terminal"

Jan 24, 2010

if you do the command conky in terminal, it starts conky ofcourse, but it also shows output to that terminal so you can't do any other commands to that terminal, Is their an option like you can do with the '&' sign in other cases? If you do the '&' sign with conky it still gives output, also the conky -d command gives output...

View 9 Replies View Related

Ubuntu :: Use Terminal To Search For All Files Who Are Not Of A Specified Type?

Sep 14, 2010

I want to use the terminal to search for all files (also the hidden ones) who are not of a specified type.

For example; I want to find all files that do not end with *.txt.

How do I do this?

View 9 Replies View Related

Ubuntu :: Search For An Exact String In A Terminal?

Oct 22, 2010

Is there hopefully a way to search for an exact string in Man Pages? I know if I want to search for anything containing -c I can just do this.

Code:
/-c

How would I search for "-c"? I want only "-c" to show up. So I tried this.

Code:
/"-c"

It took me literally and looked for the quotes also.

View 8 Replies View Related

General :: Terminal Emulator - Output ?

Jan 10, 2011

What is the output of "date -u +%jXfce|sha256sum|sed 's/W//g'" if you run it in a terminal emulator?

View 3 Replies View Related

OpenSUSE :: Get The RAM Memory On System In Terminal When Have 3 GB With An Output?

Sep 12, 2011

How can i get the RAM Memory on system in terminal when i have 3 GB with an output like this:

3072
or
3145728

[code]....

View 8 Replies View Related

Ubuntu :: Capturing ALL Output From Terminal To File?

Apr 17, 2010

I would like to capture all output spewed to a terminal session including processes that are terminated that were invoked from a script running in a terminal window. this is beyond capturing just stderr and stdout . for example

{
./script
} 2> stderr.cap 1>stdout.cap

if script is terminated (including because of memory violations) I get spewed output to the terminal I would like to capture that spewing to a file automatically or to a bit bucket /dev/null Is there another filehandle which can be redirected to do this? If so how or is there another way???

View 3 Replies View Related

Ubuntu :: Get Mouse Position In Terminal Output?

Jun 19, 2010

I want to know how to get the current coordinates of the mouse outputted to terminal, for use in a bash script.

View 1 Replies View Related

Ubuntu :: Capture Output From Synaptic Terminal?

Dec 9, 2010

In synaptic package manager when I expand "Details" tab (at the time when some software is installed or removed), I can see a terminal. I want to capture the output of terminal into a file. I tried to highlight and right click. But there is no context menu(copy, cut)

View 4 Replies View Related

Ubuntu :: Slow Down Text Output In Terminal?

Feb 15, 2011

I'd like to write a script that invokes a gnome-terminal session which slowly reads out text like the phosphor screensaver (could be anything, a log file, ascii art, song lyrics, whatev) and then closes. I can invoke a terminal using [gnome-terminal -e 'cat /var/log/dmesg'] but the output flies pass by too quickly.any way to slow it down? I know it seems like an odd request but if anyone has a suggestion I'd love to hear it.

View 3 Replies View Related

Ubuntu :: Save All Terminal Output To A .txt File?

Mar 15, 2011

I sometimes stick my neck out and provide somewhat detailed, and often risky, "Mr-fix-it" remedies for boot problems. Now, I know it's possible to amend each command with "whatever_command > whatever.txt" in which case it'll place the command output in a file in /home.

But if you're directing someone to run a lot of commands as I did here is it possible to save the output of all commands to a .txt file without amending each command?

Or is it already saved somewhere that I'm not yet aware of? I wouldn't be surprised if the latter were true, I just haven't yet found it

View 4 Replies View Related

General :: Short Cut To Copy From Terminal Output?

Dec 10, 2010

if we type a command such as "locate somefilename" in the terminal we will get all the paths to the file name as output. If i want to copy only one line from that output how do i do that without using mouse?i need terminal short cut to copy one line

View 8 Replies View Related

Programming :: Not Getting Right Output To Correct Terminal Window

Jun 17, 2010

I have a server client prog in which server is my 'agent' and client is 'manager'. Following is the code for both agent and manager. I want my agent to send what manager is requesting. But it is not working the way I want. The parameters which manager is requesting, agent has to send to manager but in this program result for those parameters is shown on agent's own terminal window. Where as I want them on manager's window. Secondly, there result is not correct, means it is giving ' 0 K ram and 0 no of process....

Code:
//code for MANAGER
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h> .....

View 2 Replies View Related

Red Hat :: Directing Cron Output To Terminal Screen?

Sep 7, 2010

I am trying to display a text using crontab. My settings :

*/2 * * * * /bin/echo "hello"

This setting sends a mail to the user, instead of displaying on the screen. Now tried changing the setting to:

*/2 * * * * /bin/echo "hello" > /dev/tty1

Now I can see the text on the screen, but this setting comes with a catch. What would happen if the user changes the terminal. for instance if he gets into tty2, he wont have write access on tty1. So the user gets a mail saying "permission denied". Is there any way that I can force the user to use a particular terminal or can a cron job be set in a way such that the user would get the text irrespective of the terminal he logs in.

View 1 Replies View Related

Slackware :: Attach The Terminal Output Of The Compile?

Apr 11, 2010

running current with 2.6.33.1-smp kernel i cant seem to get the slib slackbuild to run. it just quits without ever building the tgz. i hope i can attach the terminal output of the compile.

View 8 Replies View Related

Fedora X86/64bit :: Installing RPM - Yum Output Via Terminal Error

Mar 16, 2011

I'm new to Fedora and the Red Hat way of doing things, having been a Ubuntu/Mint user for the last 5-6 years. I've been using Fedora for my daily computer now for the last 3-4 months - a change that has definitely been for the better! However, earlier this morning I went to install a .rpm, and yum output via terminal the following error:

Code:
[leeky@darkstar ~]$ sudo yum install opera
[sudo] password for leeky:
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Adding en_US to language list
Loading mirror speeds from cached hostfile
* fedora: mirror.netrino.co.uk
* rpmfusion-free: mirror01.th.ifl.net
* rpmfusion-free-updates: mirror01.th.ifl.net
* rpmfusion-nonfree: mirror01.th.ifl.net
* rpmfusion-nonfree-updates: mirror01.th.ifl.net
* updates: mirror.netrino.co.uk
Error: database disk image is malformed
[leeky@darkstar ~]$

This is the first time I have received this error. I've now tried the following methods of resolving this problem with no luck:

1. Code:
yum clean all
2. Code:
yum clean metadata
yum clean dbcache
yum makecache
3. Physically removing the /var/libs/yum folder, and creating a new "yum" folder, and then step two above to rebuild it. Either way the problem then still returns in terminal.

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







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