Hi i am using a shell script for renaming the files and placing in the remote location(FTP) my code is:
cd $1
day=$(date +%d)
for i in `ls -1 BBW*`
do
last=`tail -1 $i`
pat=`expr "$last" : '.*(\(.*\)).*'`
pat=`echo $pat | sed 's/ /_/'`
pat=$pat$day
mv $i $pat
rm -f $day
done... (3 Replies)
I have a script file. test.sh
I am running it by command
sh test.sh 10102004
where 10102004 is the script argument.
I wan to assign this 10102004 to a variable.
How can i do this?
I tried &1 and awks ARGV its not working :( (2 Replies)
1. The problem statement, all variables and given/known data:
The script usage will be as follows:
library.third source_directory
- Your script will display an appropriate error message and exit with status 3 if no parameters are given
- Your script will display an appropriate error... (2 Replies)
I need to check if an account has a valid password.
Would something like this work?
read ACCNAME
if grep -q "^$ACCNAME:\$6:" /etc/shadow; thenI noticed every entry in my shadow file that has a password starts with $6 ... it works for my current setup, but would it always work? I can't test... (4 Replies)
I want to make a script that check for the argument passed to it and generates an error in case any character/string argument passed to it.
I am using below code, but its not working. can anyone help.
#!/bin/bash
if ]; then
echo 'An integer argument is passed to the script hence... (3 Replies)
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
Hi,
I am trying to pass a variable as an argument to another script. While substitution of variable, I am facing a problem.
varaiable "a" value should be -b "FPT MAIN".
When we pass "a" to another script, we are expecing it to get substitue as ./test.sh -b "FPT MAIN". But, it is getting... (9 Replies)
How can I validate if time (HH:MM:SS) argument is valid? I got this from web but I can't modify it to exit the script if the time argument is invalid.
echo $1 | awk -F ':' '{ print ($1 <= 23 && $2 <= 59 && $3 <= 59) ? "good" : "bad" }'
ex:
./script.ksh 12:34:21 = okay
./script.ksh... (10 Replies)
Hello,
I am trying to develop a script to check for valid hostnames. Below are the prerequisites for a valid hostname which I got from wiki :
Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label... (8 Replies)
Discussion started by: rahul2662
8 Replies
LEARN ABOUT DEBIAN
restoredirvbe
RESTOREDIRVBE(3) MBK LOGICAL FUNCTIONS RESTOREDIRVBE(3)NAME
restoredirvbe - restore connectors directions from behavioral view
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
SYNOPSYS
#include "mlo.h"
int restoredirvbe(ptfig)
lofig_list *ptfig;
PARAMETER
ptfig Pointer to a lofig_list
DESCRIPTION
The restoredirvbe function read the PORT section of the vhdl behavuoiral view of the figure, restores the externals connectors directions
and order them as indicated in the vbe.
RETURN VALUE
restoredirvbe returns 1 on success, 0 if there is an error while reading the vbe file, -1 if their is no vbe.
ERROR
"*** mbk error *** restoredirvbe : no figure given"
The ptfig parameter is NULL.
"*** mbk error *** restoredirvbe : figure %s have more connectors than vbe"
Number of connetors in vbe and in figure must be identical. If the vbe have more connectors, the getlocon function give an error on
the unknown connector.
"*** mbk error *** restoredirvbe : cannot read port well!"
To restore the connectors directions, the vbe description must have a port well.
"*** mbk error *** restoredirvbe : bit_vect neither to nor downto"
In a port section of a vbe, the bit vector must have indication of the sens of incrementation.
EXAMPLE
#include "mut.h"
#include "mlo.h"
lofig_list * getgoodlofig(figname, mode)
char *figname;
char mode;
{
lofig_list *ptfig;
ptfig = getlofig(figname, mode);
restoredirvbe(ptfig);
return ptfig;
}
SEE ALSO mbk(1), lofig(3), locon(3), getlofig(3),
BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM /LIP6 October 1, 1997 RESTOREDIRVBE(3)