10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
> cat test.sh
for t in `cat out.txt`
do
echo create directory data as "'"$t"';"
done
>
output of out.txt is as below
/oracle/SID/data1/file2_1/
/oracle/SID/data1/file1_1/
/oracle/SID/data1/file5_5/
/oracle/SID/data1/file_9/
/oracle/SID/data1/file_2/
when i run my test.sh... (6 Replies)
Discussion started by: crazy_max
6 Replies
2. Shell Programming and Scripting
Hi All,
Need a for loop which should run for number of files in a folder and should pass the file name as parameter to another shell script for each loop.
Please help me.
Thanks. (2 Replies)
Discussion started by: chillblue
2 Replies
3. Shell Programming and Scripting
sorry couldnt think of a proper title lol
ok i have the following script it asks the user how many html tags they want. Im not sure how to display 2 tags if the user eneters the want only 2 tags
tags as in <p></p> or <h1></h1>
read -p "How many tags" tags1
if
then
echo "<$tags1>... (3 Replies)
Discussion started by: gangsta
3 Replies
4. Shell Programming and Scripting
Currently I am outputting users and I want to number them starting with 1...
grep name list.txt | awk -F"=" '{ print $2 }' | while read user; do
echo -e "1\t|$user"
Currently I have:
1 | john
1 | amy
1 | max
I want it to look like
1 | john
2 | amy
3 | max (2 Replies)
Discussion started by: etranman1
2 Replies
5. Shell Programming and Scripting
Trying to compile all SQL files using a shell script. But the below code is not working. Below Code works fine when for loop is not there(commenting line no: 1,2 and 9).
1. sq_lfile=`ls *.sql`
2. for current_sql_file in $sql_file
3. do
4. sqlplus uname/pass@Service>>SQLLOG << -ENDOFSQL... (3 Replies)
Discussion started by: Dip
3 Replies
6. Shell Programming and Scripting
How can I print number pyramid with for loop(not while only for) in unix like:
1
22
333
4444
55555
---------- Post updated at 09:09 AM ---------- Previous update was at 09:07 AM ----------
I forgot it is in ksh...I wrote a script in bash but it is nt wrkng in ksh...
bash script... (12 Replies)
Discussion started by: joshilalit2004
12 Replies
7. Shell Programming and Scripting
Hi there,
I need to add a sequence of numbers to existing variables within the script to be able to call the variable automatically. Somehow it's just printing the loop number. Here's what I've got so far. :eek:
#!/bin/sh
FOLDER1=foo
FOLDER2=bar
FOLDER3=beer
for ((a=1; a <= 3 ; a++))... (2 Replies)
Discussion started by: siul0_0
2 Replies
8. Shell Programming and Scripting
Initially i store some files into anothe file Y. Now i want read the contents of file Y one by one do some check on each file.
i,e
Open file Y (contains multiple files)
First read a file , do some check on that individual file.If that file satisfies teh condition put it in another file.
Now... (1 Reply)
Discussion started by: vasuarjula
1 Replies
9. Shell Programming and Scripting
hey guys. i'm new to shell scripting but not new to programming. i want to write a script that will take all the files in the current directory that end with a particular filetype and change all their names to a number in order. so, it would take all the jpg files and sort them in alphabetical... (30 Replies)
Discussion started by: visitorQ
30 Replies
10. Programming
Hi,
Am working on linux. while forking in a loop how to avoid the child process from forking..for example
int n = 5;
pid_t pid;
pid_t ch_pid;
/*exactly wanted to create n processes and not 2^n processes*/
for(i = 0; i < n;i++)
{
if(pid = fork())
{
/* parent... (4 Replies)
Discussion started by: rvan
4 Replies