10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
First of all this is my first post and im fairly new to working with Unix and creating scripts etc. so there will probably be wrong phrases used.
Lets get to my questions.
I have multiple scripts that submit Slurms/Jobs to the cluster starting like this and doing certain... (3 Replies)
Discussion started by: idbemad
3 Replies
2. Shell Programming and Scripting
Hi,
I am quite scripting illiterate and have been trying to write a bash script to compare to two files which i have populated in two seperate arrays as below and confirmed that all the files are loaded into the array.
IFS=$'\n'
filea=($(find /var/tmp/dir1 -type f -follow -print))... (12 Replies)
Discussion started by: jlykke
12 Replies
3. Shell Programming and Scripting
I am creating (with help) my own version of a calculator script that simply merges 2 arrays ( ${a}${b}${a}${b}... etc )
#!/bin/bash
echo "Enter the integers you would like to calculate"
read -a nums
echo "You entered ${#nums} integers"
let batch="${#nums}-1"
echo "Enter how you want to... (2 Replies)
Discussion started by: pbmitch
2 Replies
4. How to Post in the The UNIX and Linux Forums
I am new for script writing. I have a file named as name.dat and contain numbers with different rows and columns. I want to sum numbers at one row with that of at another row; like row1 + row101 + row 201, with corresponding columns. Any one can help me to write a script for this operation.
... (1 Reply)
Discussion started by: kumnegert
1 Replies
5. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
6. Red Hat
Dear Madam/Sir
Who can help me with writing a script doing the following?
1- Read names of files (only files with special name format let say initially they have the same file name start like TT*)
2- Then create an empty files with the same names have been read in step one but with extension... (1 Reply)
Discussion started by: m.nageeb
1 Replies
7. Shell Programming and Scripting
I have 2 arrays abc and xyz
abc = ( a b c d e f g h i j k l m n o p q r s t u v w x y z )
and
xyz = ( b c d e f )
lets assume a .... z are the file name.
I have to perform a pattern replacement on each file present in abc array accept the files i have in xyz array. and i am doing... (4 Replies)
Discussion started by: kukretiabhi13
4 Replies
8. UNIX for Dummies Questions & Answers
Here is the script I am trying to write along with my answer I wrote. Please help me understand why it doesn't work.
Create an executable script file called "newname" that will perform the followings:
1. Rename a file upon the user's request. If the file exists, prompt the user for... (1 Reply)
Discussion started by: wiggles
1 Replies
9. Shell Programming and Scripting
Hi,
can we use arrays in shell script?
I have this so far:
#!/bin/sh
isql -Usa -P -S DBSERVER -o output << EOF
sp_transactions "state", "prepared", "xactname"
go
/
EOF
the file 'output'' will be have many entries and I want to caputre the transaction names only: grep 000 output works... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
10. Shell Programming and Scripting
hello all.. I have been browsing / searching through the forum and have yet not been able to find what I was looking for.
I am fairly new to ksh and my task is to create a function that reads in an input file:
*****************
2
3
1
abc
def
ghi
/dev/sid/
*****************... (13 Replies)
Discussion started by: sidamin810
13 Replies