I have been searching around the forums here trying to find a solution to my problem but not getting anywhere but closer to baldness.
I have a 20 column pipe "|" seperated text file. The 14th variable doesnt always exist, but will have the format of YYYYMM or YYYY if it does.
I need to take... (2 Replies)
Hi,
I have two variables - A and B - containing a bunch of file paths. I am comparing them and when I find a match I want to remove that entry from A so that as the compare proceeds A shrinks entry by entry.
How can I remove a matched entry from A whilst leaving the non matched entries... (6 Replies)
I have a shell script similar to:
#!/bin/sh
a=1
source a1.sh -- Modifies a
source a2.sh -- Modifies a
echo "After execution, value of a is $a"
What i need is a1.sh script modify the same variable a and same with a2.sh. Now the echo "After execution, value of a is $a" should print the... (1 Reply)
Hi,
I have two issues:
I have one file say file1.dat and its over 3GB. It contains pipe delimited fields. The first line in the file is the header field which tells the column names etc. and from second line it's the data fileds with pipe delimited. Something like below:
... (5 Replies)
Hi Guys,
Is there a simple way of doing the below.
Available<spaces>Assigned<spaces>Maximum<spaces>Maximum<spaces>Page<spaces>Total <spaces>Used<spaces>Pct<spaces>Max. Pct<CR>
Space<spaces>Capacity<spaces>Extension<spaces>Reduction<spaces>Size<spaces>... (8 Replies)
I have written a shell script to do some processing and have to manipulate a variable. Basically, the variable is like this --
var=set policy:set cli
My purpose is to split it into two variables based on the position of ":". To get the right end, I am doing this --
vaa1=${vaa#*:}
... (1 Reply)
Hi forum, I am really hoping somebody can please help me here.
I have a dataset in xyz format, with longitude as x, latitude as y and data readings as z.
eg.
0 90 -8
1 90 23
2 90 -4
etc etc etc
What i am looking to do is format the data so that x and y are untouched, however in... (2 Replies)
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
LEARN ABOUT MINIX
test
TEST(1) General Commands Manual TEST(1)NAME
test, [ - test for a condition
SYNOPSIS
test expr
[ expr ]
OPTIONS
(none)
EXAMPLES
test -r file # See if file is readable
DESCRIPTION
Test checks to see if files exist, are readable, etc. and returns an exit status of zero if true and nonzero if false. The legal operators
are
-r file true if the file is readable
-w file true if the file is writable
-x file true if the file is executable
-f file true if the file is not a directory
-d file true if the file is a directory
-s file true if the file exists and has a size > 0
-t fd true if file descriptor fd (default 1) is a terminal
-z s true if the string s has zero length
-n s true if the string s has nonzero length
s1 = s2 true if the strings s1 and s2 are identical
s1 != s2 true if the strings s1 and s2 are different
m -eq m true if the integers m and n are numerically equal
The operators -gt, -ge, -ne, -le, and -lt may be used as well. These operands may be combined with -a (Boolean and), -o (Boolean or), !
(negation). The priority of -a is higher than that of -o. Parentheses are permitted, but must be escaped to keep the shell from trying to
interpret them.
SEE ALSO expr(1), sh(1).
TEST(1)