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
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
4. UNIX for Dummies Questions & Answers
I need two solutions
1) How can i swap the first and last character in each line of file temp
2) How can i display content of the file using sed command
Please help (2 Replies)
Discussion started by: champu
2 Replies
5. Shell Programming and Scripting
Hello,
I am trying to learn how to pass something more than a one-command startup for gnome-terminal.
I will give an example of what I'm trying to do here:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
______________________________________________
${0##*/}
run... (0 Replies)
Discussion started by: Narnie
0 Replies
6. Shell Programming and Scripting
Hello all,
I have just started doing shell scripting.
I want to read a file which stores the status of my job I have submitted
on a cluster.
The file looks something like this :
========================FILE=============================
crab: Checking the status of all jobs: please wait... (4 Replies)
Discussion started by: learn_linux
4 Replies
7. Shell Programming and Scripting
I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example:
mycmd=''
if ...; then
$mycmd='sudo '
fi
$mycmd=$mycmd 'sed -i prev s/aaa/bbb/' $myfile
res=`$mycmd`
(I'm also not sure of the best way to execute the command from the... (1 Reply)
Discussion started by: littlejon
1 Replies
8. Shell Programming and Scripting
Hi All,
I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options.
Requirement:
Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Discussion started by: Ranu
0 Replies
9. UNIX for Dummies Questions & Answers
echo -n "1. Updating Password Policy in OID..." | tee -a $logfile
set ldap_v1 = `ldapsearch -b "" -h $oid_host -p $oid_port -D "cn=orcladmin" -w $admin_pwd -s sub "cn=PwdPolicyEntry" dn | head -1`
echo "dn:$ldap_v1" > ldap1.out
echo "changetype:modify" >> ldap1.out
echo... (2 Replies)
Discussion started by: maoro
2 Replies
10. UNIX for Dummies Questions & Answers
hi,
I am new ot unix. So, can i write a shell(c shell or korn shell) program to access internet? I mean if I run the program, it can access specified url and then copy the html to a file? Can anyone help me? And how can make the program runs every 1 hr?
new comer (2 Replies)
Discussion started by: firebirdonfire
2 Replies