Sponsored Content
Top Forums Shell Programming and Scripting Bash $(...) DISPLAYS EVERY COMMAND Post 302965659 by DGPickett on Monday 1st of February 2016 03:35:42 PM
Old 02-01-2016
No, this just applies to the subshell of the (...). Here is another example, with first page of screen output:
Code:
$ (cd GnuCash ; find * -type f|while read f; do  fi [ ! -s ~/GnuCash2/"$f" ]thencp -p "$f" ~/GnuCash2/"$f";continuefid="$(cmp "$f" ~/GnuCash2/"$f" 2>&1)";  if [ "$d" != "" ];  then   echo Differ: "$d";ls -ld "$f" ~/GnuCash2/"$f";  fi; done)2>&1|pg























cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
Differ: ubuntu-DGPickett.gnucash /home/dgp/GnuCash2/ubuntu-DGPickett.gnucash differ: byte 13, line 1
-rw-rw-r-- 1 dgp dgp 1345098 Jan 30 15:04 /home/dgp/GnuCash2/ubuntu-DGPickett.gnucash
-rw-rw-r-- 1 dgp dgp 1347820 Feb  1 13:12 ubuntu-DGPickett.gnucash
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
cmp "$f" ~/GnuCash2/"$f" 2>&1
:

You can see it is a pretty worthless thing to do, too!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Dual Displays

I have a TV and a monitor hooked up to my box. Right now the system is displaying all the information on the TV instead of the monitor, obviously I want to switch this, as the TV is very impracticle for everything other than watching movies. I thought I remembered a command I used to use that... (2 Replies)
Discussion started by: Synbios
2 Replies

2. HP-UX

Dual Displays HP-UX 10.20

Hello All! Where I work we have C3600's that have a video cards that have both DVI and Regular RBG type monitor ports on them. My question is: is it possible to spread my desktop across two monitors that are plugged into the one card much like you can do with NVIDIA software like NVIEW for... (0 Replies)
Discussion started by: giftedone
0 Replies

3. UNIX for Dummies Questions & Answers

Creating a file that contains output from a command, and then displays itself

hey, I'm trying to create the command that will create a file named user.txt that contains the output of the command cut -d: -f1,5 /etc/passwd, and displays itself afterwards. I don't know how to bridge cat > user.txt with cut -d: -f1,5 /etc/passwd, or how display it afterwards. Any help would... (2 Replies)
Discussion started by: raidkridley
2 Replies

4. AIX

Command last displays wrong hostname

I faced an interesting problem on my AIX servers. When I checked last logins with command last I saw that hostnames are wrong. Let say, I made login from workstation xxxxx and with the command last I saw: root pts/2 yyyyy 5 jan 15:38 still logged in Ping xxxxx and ping... (3 Replies)
Discussion started by: giovanni
3 Replies

5. AIX

Typing "bash" at the command line spawns two bash processes

Server: IBM p770 OS: AIX 6.1 TL5 SP1 When one of our develoeprs types "bash" on the command line to switch shells, it hangs. For some reason, two bash processes are created....the first bash process spawns a second bash process in the same console, causing a hang. Anyone have any idea what... (2 Replies)
Discussion started by: wjssj
2 Replies

6. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

7. Solaris

Last command displays wrong information

Hi am having Solaris10 - Sun-Fire-V890 server, the information displayed by Last command is wrong how do i get this sorted without loosing any datas.. # uptime 12:32am up 20 day(s), 33 min(s), 1 user, load average: 1.54, 1.82, 1.93 # last reboot reboot system boot Sat... (9 Replies)
Discussion started by: Sojourner
9 Replies

8. UNIX for Dummies Questions & Answers

Which of the following command displays your login shell in bash shell?

Options:: A)$shell B)echo $ bash C)echo $ O D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies

9. Shell Programming and Scripting

Cp command works on command line but not in bash

The below command moves all the .vcf files into the directory. cp /home/cmccabe/Desktop/test/vcf/overall/stats/*.vcf /home/cmccabe/Desktop/NGS/annovar When I use a bash wrapper the target.txt gets created but the text files do not get copied. All the paths are the same, but not sure why... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies
BZDIFF(1)						      General Commands Manual							 BZDIFF(1)

NAME
bzcmp, bzdiff - compare bzip2 compressed files SYNOPSIS
bzcmp [ cmp_options ] file1 [ file2 ] bzdiff [ diff_options ] file1 [ file2 ] DESCRIPTION
Bzcmp and bzdiff are used to invoke the cmp or the diff program on bzip2 compressed files. All options specified are passed directly to cmp or diff. If only 1 file is specified, then the files compared are file1 and an uncompressed file1.bz2. If two files are specified, then they are uncompressed if necessary and fed to cmp or diff. The exit status from cmp or diff is preserved. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWbzip | +--------------------+-----------------+ |Interface Stability | Committed | +--------------------+-----------------+ SEE ALSO
cmp(1), diff(1), bzmore(1), bzless(1), bzgrep(1), bzip2(1) BUGS
Messages from the cmp or diff programs refer to temporary filenames instead of those specified. BZDIFF(1)
All times are GMT -4. The time now is 09:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy