06-15-2017
Can you share your code so we can actually see it? If it is huge, then please post a meaningful skeleton that exhibits the same issue so we can consider it and help you find a solution.
Please post the code wrapped in CODE tags for clarity.
Kind regards,
Robin
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Apologies for the trivial nature of this question but I cannot seem to get a simple re direct to a log file to work
Step 1
touch log.txt
at -f batch.sh now >> log.txt
I am trying to get the batch.sh contents into the log file
Manny Thanks (8 Replies)
Discussion started by: JohnCrump
8 Replies
2. Shell Programming and Scripting
Hi,
I want ssh to the remote server and then execute ls and redirect the output to the file in remote server itself
like
ssh root@$server `ls /var/log/users.txt > root@$server:/home/users.txt`
Can you please let me know the correct syntax for it.
Thanks in advance (2 Replies)
Discussion started by: mohitmoudgil
2 Replies
3. UNIX for Dummies Questions & Answers
Suppose I have a file named a
When I write
cat a>a
The following error message is displayed
cat: a: input file is output file
and my file a is truncated to zero size.
Also the exit status of the last command is 1
Can someone tell me what actually happens when I do so? (1 Reply)
Discussion started by: aagajaba
1 Replies
4. UNIX for Dummies Questions & Answers
I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines.
Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Discussion started by: joemommasfat
2 Replies
5. Shell Programming and Scripting
I have a system stat command running which generates data after 5 sec or so. I pass this data to awk and do some calculation to present the data differently. Once done now I want to pass this data to file as and when generated but doesn't work..unless the first command completes successfully.... (6 Replies)
Discussion started by: learnscript
6 Replies
6. Shell Programming and Scripting
I am using tar command to append daily database backups on tape. "tar --append " command help me to do this.
But tar --append command does not produce any output on stdout if it succeed.
I want the output for that appended command to a log file.
This log file should contain only the name of the... (0 Replies)
Discussion started by: pganguly46
0 Replies
7. Shell Programming and Scripting
So I have a existing file that I used the uniq command on and I need to save the output to the same file without changing the file name.
I have tried $ uniq filename > filename
then when I cat the file it then becomes blank like there is nothing inside.
any help would be much appreciated... (0 Replies)
Discussion started by: drew211
0 Replies
8. UNIX and Linux Applications
Dear All,
./waf --run scratch/myfirst > log.out 2>&1
The above is a command line to redirect the output to a file called log.out.
what is the 2>&1 part for ?
Thank you (2 Replies)
Discussion started by: knowledgeSeeker
2 Replies
9. Shell Programming and Scripting
I need to count the number of lines in a .txt file and put it in a variable.
I am using the following code
#!/bin/bash
count = $(wc -l "some file.txt" | awk '{print$1}')
echo $count
It is giving the following error.
line3: count: command not foundWhat am I doing wrong here? :confused: (7 Replies)
Discussion started by: haritha.gorijav
7 Replies
10. Shell Programming and Scripting
I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies
comb(1) General Commands Manual comb(1)
NAME
comb - Combines Source Code Control System (SCCS) deltas
SYNOPSIS
comb [-clist] [-os] [-pSID] file...
The comb command writes to standard output a shell procedure for combining the specified deltas (SIDs) of an SCCS file and creating a new
version of the file with fewer deltas.
OPTIONS
Each option or group of options applies independently to each named file. Specifies a list of deltas (SIDs) that the shell procedure will
preserve (see get -ilist). The procedure will combine all other deltas. Accesses the reconstructed file at the release of the delta to be
created for each get -e generated; otherwise, accesses the reconstructed file at the most recent ancestor. Using the -o option may
decrease the size of the reconstructed SCCS file. It may also alter the shape of the delta tree of the original file. Specifies the SID
of the oldest delta for the resulting procedure to preserve. All older deltas are combined in the reconstructed file. Causes comb to gen-
erate a shell procedure that, instead of combining the deltas, produces a report for each file, which lists the file name, size (in blocks)
after combining, original size (also in blocks), and percentage change computed by the following formula: 100 * (original - combined) /
original
Run comb using this option before actually combining SCCS deltas in order to judge how much space will actually be saved by the com-
bining process.
DESCRIPTION
By piping the output of the comb command to a shell, or redirecting the output to a file and running that file as a shell procedure, you
can reduce the size of your SCCS file. You can first see how much the file will be reduced by running the comb command with the -s option.
If you specify a directory in place of file, the comb command performs the requested actions on all SCCS files (that is, those with file
names with the s. prefix). If you specify a - (dash) in place of file, the comb command reads standard input and interprets each line as
the name of an SCCS file. The comb command continues to take input until it reads End-of-File.
If you do not specify any options, the comb command preserves only leaf deltas and the minimal number of ancestors needed to preserve the
tree (see the delta command).
The comb command may rearrange the shape of the tree deltas.
The comb command may not save any space; in fact, it is possible for the reconstructed file to actually be larger than the original.
EXAMPLES
To generate a report on how much space will be saved by combing all deltas older than SID 1.4 for SCCS file s.test.c, enter: comb -p1.4 -s
s.test.c | sh To actually combine the deltas, enter: comb -p1.4 s.test.c | sh
FILES
Temporary files.
SEE ALSO
Commands: admin(1), cdc(1), delta(1), get(1), prs(1), rmdel(1), sact(1), sccs(1), sccsdiff(1), sccshelp(1), unget(1), val(1), what(1)
Files: sccsfile(4)
Programming Support Tools
comb(1)