10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have two shell scripts in the different directories listed below,
/root/dev/dir1/test.sh
/root/dev/dir2/master.sh
I am executing the master.sh script from the test.sh like below and getting 'Permission denied' error.
#! /bin/sh
#test.sh
path='/root/dev'
$path/dir2/master.sh
But it... (2 Replies)
Discussion started by: vel4ever
2 Replies
2. Shell Programming and Scripting
Hello all! I am very new to shell and Linux in general (I just started 2 days ago), I am trying to write a script that adds the size of the directories and files in a given directory and displays messages if the user puts in something wrong. I think I have covered all the possible problems except... (3 Replies)
Discussion started by: 2358
3 Replies
3. Shell Programming and Scripting
hey guys
I would really appreciate some help, i need to do a project for a job that requires minimal UNIX scripting and im REALLY stuck
basically Im stuck at what i believe is something really simple but i just dont have a clue how to do it efficiently and properly and i REALLY appreciate some... (16 Replies)
Discussion started by: thurft
16 Replies
4. Shell Programming and Scripting
Hi,
I have a loop like this -
while read item
do
// fire insert query
done < itemList.txt
The itemList.txt has say, 1000 records. Now what I do is that rhough another program, I make the itemList.txt EMPTY, but still the INSERT query keeps firing the sequence of records.
... (18 Replies)
Discussion started by: angshuman_ag
18 Replies
5. Shell Programming and Scripting
Hi,
I have a text file with data in that I wish to extract, assign to a variable and process through a loop.
Kind of the process that I am after:
1: Grep the text file for the values.
Currently using:
cat /root/test.txt | grep TESTING= | awk -F"=" '{ a = $2 } {print a}' | sort -u
... (0 Replies)
Discussion started by: Spoonless
0 Replies
6. Shell Programming and Scripting
I'm trying to approach a problem but all I'm coming up with are complex ways to manipulate the data. But still not getting the desired outcome.
directory of files....
file-100-foo
file-100-man
file-100-chu
Need to copy the files and increment the number in the file name
... (4 Replies)
Discussion started by: suphawk
4 Replies
7. Shell Programming and Scripting
sorry for being dumb here, but is there a way my for loop can take an entire line of a file into consideration instead of each word in a line... ill explain
if i have a file like this
# cat list
serial: 23124
hostname: server1
and a script that does this
# cat list.sh
#!/bin/sh
... (6 Replies)
Discussion started by: hcclnoodles
6 Replies
8. UNIX for Dummies Questions & Answers
I have a script problem that I am not able to solve due my very limited understanding of unix/awk.
This is the contents of test.sh
awk '{print $1}'
From the prompt if I enter:
./test.sh Hello World
I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
have a basic query.
Please see the below code:
list="one two three"
for var in $list ; do
echo $var
list="nolist"
Done
Wht if I want to print only first/ last line in the list
Eg one & three
Regards
er_ashu (3 Replies)
Discussion started by: er_ashu
3 Replies
10. Shell Programming and Scripting
If I did indeed grep something out of it, why woudln't $result show nothing?
When I do $? , it does show success...
What is the proper syntax so that $result shows actual thing it's grepping out?
result=`(ssh $host tail -1 /something/somethingelse) | egrep -i "value" >dev/null`
#echo... (3 Replies)
Discussion started by: convenientstore
3 Replies