Hi,
I am facing one problem only with mv command not with cp command. I have a test program
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <errno.h>
int sync_file(char *file)
{
FILE *fp=NULL;... (6 Replies)
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
What is the difference between (unix-system “which ) and which commands.
For example when I use the (unix-system “which visual_elite) command I get the following result:
/home/vhdl/edatools/mentor/visualelite/VisualElite-4.2.1/Linux2.4/bin/visual_elite
When I do the same on... (1 Reply)
Hey there,
I just stumbled upon a difference between using awk on the commandline and using it in a shellscript.
I have a variable, e.g.: PROG=vim
then i want to check if the package with this name is installed: TEMPVAL=$(dpkg -l | awk '{ if ($2 == "$PROG") print $2 }') (Im using... (10 Replies)
Hello,
I have two text files, each with a single column,
file 1:
124152970
123899868
123476854
54258288
123117283
file 2:
124152970
123899868
54258288
123117283
122108330 (5 Replies)
I have awk appearing to behave inconsistently. With the same variable it will give the message:
fatal: attempt to use array `X' in a scalar context
and, if I try to correct that, then:
fatal: attempt to use a scalar value as array
I'm using a three dimensional array. There seems to be a... (2 Replies)
so, im going over one of my scripts and trying to optimize it.
i have a code like this:
cksum sjreas.py | awk '{prinnt $1$2}'
This does what I need. However, i dont want to call the external command awk. so im doing this:
cksum sjreas.py | while OFS=' ' read v1 v2 ; do printf... (4 Replies)
In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13.
I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)