Its giving me error
$ ./roottelnet.sh
./roottelnet.sh: line 2: syntax error near unexpected token `$'do\r''
'/roottelnet.sh: line 2: `do
Hello sharp488,
Seems you may have carriage characters in your script which you are using, could you please use following command to confirm the same.
Where Input_file is your script name. If you are seeing control M characters there like as an example as follows.
If you find above control M characters into your script then you could try following to remove them.
Then you could try to run your script. Kindly do let us know if you have any queries on same.
I have a shell script which takes at the command prompt options like
ss1.sh -F SCOTT -T JOHN
F- From User
T- To User
I want to pass the From User(SCOTT) Value to another script
ss2.pls (This script runs a PL/SQL Program). Depending on the FromUser value in the ss1.sh script i have to... (4 Replies)
Hi All,
I have Information in the file like,
============ Interface Information ====================
+++++++++++++++++ NMInterface ++++++++++++++
ObjID:251c55a2-2257-71dd-0f68-9887a1f10000
NNMObjID:82857
EntityName:aust00m1.mis.amat.com ]
Description:ATM9/0/0-atm layer
Discovered in... (22 Replies)
# for i in `cat oo`;do ls -ld $i;done
ls: /var/tmp/i: No such file or directory
ls: i: No such file or directory
ls: /var/tmp/ii: No such file or directory
ls: i: No such file or directory
ls: /var/tmp/iii: No such file or directory
ls: i: No such file or directory
ls: /var/tmp/iiii: No such... (2 Replies)
Hi,
I'm trying to extract information from one file to update another one and am a bit stuck.
the first file is made up of tags e.g.
<item>a@b.com</item>
jksdhfjkdsh sldkjfds l klsjdf
<item> c@d.com </item>
what i'd like to do is extract the email addresses between these tags,... (6 Replies)
Discussion started by: newb1000
6 Replies
7. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
LEARN ABOUT DEBIAN
cgexec
CGEXEC(1) libcgroup Manual CGEXEC(1)NAME
cgexec - run the task in given control groups
SYNOPSIS
cgexec [-h] [-g <controllers>:<path>] [--sticky] command [arguments]
DESCRIPTION
The cgexec program executes the task command with arguments arguments in the given control groups.
-g <controllers>:<path>
defines the control groups in which the task will be run. controllers is a list of controllers and path is the relative path to
control groups in the given controllers list.
This flag can be used multiple times to define multiple pairs of lists of controllers and relative paths. Instead of the list of
all mounted controllers, the wildcard b"*b" can be used.
If this option is not used, cgexec will automatically place the task in the right cgroup based on /etc/cgrules.conf.
-h, --help
Display this help and exit.
--sticky
If running the task command with this option, the daemon of service cgred (cgrulesengd process) does not change both the task of the
command and the child tasks. Without this option, the daemon does not change the task of the command but it changes the child tasks
to the right cgroup based on /etc/cgrules.conf automatically.
EXAMPLES
cgexec -g *:test1 ls
runs command ls in control group test1 in all mounted controllers.
cgexec -g cpu,memory:test1 ls -l
runs command ls -l in control group test1 in controllers cpu and memory.
cgexec -g cpu,memory:test1 -g swap:test2 ls -l
runs command ls -l in control group test1 in controllers cpu and memory and control group test2 in controller swap.
FILES
/etc/cgrules.conf
default libcgroup configuration file
SEE ALSO
cgrules.conf (5)
Linux 2009-03-15 CGEXEC(1)