what i want:
listing files in a special range .. setting the command like this, it is working properly.
If i subst one value by a variable or a command... M=05 ls -lrt 20120601{$M..06}* "note" ls: no access to 20120601{05..06}* : cant find file or directory. .. with the command .. ls -lrt 20120601{`date +%m`..06}*ls -lrt 20120601{`date --date="9 days ago" +%m`..06}* ls: no access to20120601{05..06}*cant find file or directory.
It seems to me, that the brackets are still there ..
A colleague gave me a first hint ..
Can someone help me, how to do it... more elegant and especially with the subst. commands.
I want to find out Row which starts with, the user specified details to a script.
In general I know what command to be given.
awk '$0~/^Vi/' BReject
But I need to pass on $1 param of command line at the place of 'Vi'.
I tried with -v subst=$1
awk -v subst=$1 '$0~/^subst/' BReject
But it... (5 Replies)
Hi everybody
I want to create 20 file using simple script - listed bellow-.
But the script doesn't work.
I hope anyone guide me to correct this script
----------------
The script
integer number=01
until (($number==21))
do
>TELE-LOG-$number
number=$number+01
echo $number
done
exit... (4 Replies)
why won't below work?
I am trying to see
a)sipfile has username of the system.
b)it will read the sipfile and do a grep function against the /etc/passwd
c)it will save that output to /tmp/result..
but my script is just hanging...
#!/usr/bin/perl -w
open(SIPFILE, "</tmp/sipfile")
... (4 Replies)
Hi,
I'm quite new to scripting and I want to modify following line of an existing script:
MYVAR=`subst |grep 'L:\\\:' | sed -e 's/.*\\\//'`;
What I have to do is to use the content of a variable instead of the constant expression 'L:\\\:' as the grep string to be matched.
Assuming I already... (5 Replies)
Hi, On the log Netscape log, I need to grep for 500 error. I am doing that but I also get 1500 in that same log.
cat access |grep "500"
Results:
"GET /css/RBR.css HTTP/1.1" 200 15000 304 - - - 399 639 523 164 0
This not what I need... Please advice. (4 Replies)
So I need a script that does the following:
If a certain user is logged in
Run `command`
Else
Echo “incorrect user”
This is my first stab...which doesn't work:
#!/bin/bash
X="user=`ls -l /dev/console | cut -d " " -f 4`"
Y="foobar"
echo $X
echo $Y (4 Replies)
Hello
I have a output file that contains the next info:
host_name LET-234-WDFD-2
address 10.11.0.62
host_name XWERWE-234-WEDF-EMEEH-GIDF-3
address 10.11.32.48
host_name DFG-745-WE-EMEEEH-GIDF-4
address 10.11.32.176
host_name ... (6 Replies)
I have a string of source files
ENBL_PX11_LIBSRC = pltsub.f xpltlib.f xbuplot.cI want to replace .f and .c with .o
to get
ENBL_PX11_LIBOBJ = pltsub.o xpltlib.o xbuplot.o
However I am having trouble doing this with subst. (5 Replies)
Guys,
I want to join two files. You might have seen this many times. I just don't get the desired output.
Searching the forum, No proper links :(
Input:
File1
test1
test2
test3
File2
is bad
is not bad
Output Needed:
test1 is bad
test2 is bad (4 Replies)
Hi Gurus,
Not able to catch what's going wrong here. I just want to get output as "tree".
server:/mk/app/nexapp $ echo $SHELL
/usr/bin/ksh
server:/mk/app/nexapp $ export db_name1="tree"
server:/mk/app/nexapp $ export i=1
1st try:
server:/mk/app/nexapp $ echo $(db_name$i)
ksh: db_name1: ... (3 Replies)