10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
2. Shell Programming and Scripting
Hello :)
new to bash not to programming.
I have an on-going need to change the owning group on sets of files and directories from the one they were created with or changed to on update to the one they need to have going forward.
find {target_root} -group wrong_group
gets me a newline... (4 Replies)
Discussion started by: naftali
4 Replies
3. Shell Programming and Scripting
Hi Experts,
I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task.
I am running below command to snmpwalk the router..
snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies
4. Shell Programming and Scripting
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies
5. Shell Programming and Scripting
Hi,
Here's the problem I am facing.
This is just an example:
list_files.ksh
------------
dir=$1
match=$2
var="ls $dir | grep $match"
files=`"$var"`
I get the below error on executing the above script:
./list_files.ksh: ls /home/my_files | grep xml: not found
I know I... (2 Replies)
Discussion started by: dips_ag
2 Replies
6. Shell Programming and Scripting
Hi All
I am trying to build a script that will take data from a tab separated file and use that to split up a quicktime file. So far the code is as follows
#!/bin/sh
#test parsing of data
#fix excel file output returns
cat $1 | tr "\r" "\n" > $1.fix
printf "\n" >> $1.fix
mv $1.fix $1
... (3 Replies)
Discussion started by: babajuma
3 Replies
7. Shell Programming and Scripting
Hello everyone.
I am using the select command to build a menu, here is my question:
Is it possible to generate a menu which contains several sections and have a separator between the sections without having a selection number generated in front of the separator?
This is a sample of what I would... (1 Reply)
Discussion started by: gio001
1 Replies
8. Shell Programming and Scripting
I am using an array to store some data (keys e.g 47975081_1215781266128), it can be assumed that it is key to other data.
I want extract data from a file based on a couple of keys (range) and store the resulting data in a variable using the following command:
sed -n... (9 Replies)
Discussion started by: gugs
9 Replies
9. Shell Programming and Scripting
my description from another thread...
here's my code:
#!/bin/bash
IFS=$'\n'
function OutputName() {
input=$1
echo $input
input=`echo "$input" | sed -e 's/.//'`
input=`echo "$input".avi`
output_name=$input
}
if ]; then
echo... (5 Replies)
Discussion started by: TinCanFury
5 Replies
10. UNIX for Dummies Questions & Answers
Hi Group ,
I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages.
- i m writing
>write user-id
! ls
o
ctrl-d
inspite of executing the command ls,other terminal shows ! ls.
Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies