10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have
FILE 1 (This file has all master columns/headers)
A|B|C|D|E|F|G|H|STATUS
FILE 2
A|C|F|I|OFF_STATUS
3|4|5|4|Y
6|7|8|5|Y
Below command give me all headers of FILE 2 into array2.txt file
paste <(head -1 FILE2.txt | tr '|' '\n')>array2.txt
So I would like to compare... (2 Replies)
Discussion started by: jmadhams
2 Replies
2. 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
3. Shell Programming and Scripting
Hello guys I'm new to shell scripting and I need to make a game using shell script. I want to know if it is possible for me a total noob to shell scripting to make this game.
The game concept is simple:
First thing when you launch the script you get a menu in which you select if you want to... (3 Replies)
Discussion started by: Othmane
3 Replies
4. Shell Programming and Scripting
In one of my shell function I found the following
set_default_values () {
prog=$1
PROC_DT=$2
RESET_ALL="${3-N}"
#echo "Processing date as passed = , Program name = "
......
I understand the first and second arguments, but don't understand... (1 Reply)
Discussion started by: digioleg54
1 Replies
5. Programming
Hello.
I need to write a command line interface that can be invoked either directly from the shell (command sub-command arguments), or as a shell that can process sub-commands.
i want to use bash auto completion for both scenarios.
example: lets say my CLI module is called 'mycli' and there... (5 Replies)
Discussion started by: noamr
5 Replies
6. Shell Programming and Scripting
Hi,
I need help in creating a array in shell scirpt.
I have a file which has following details.
hostname devices
device1
device 2
de
abcdmhs10 1234
2343
2353
3343
3435
2343
bcdfmhs11 2343
2443
3434
8874
0343
3434 (5 Replies)
Discussion started by: jpkumar10
5 Replies
7. Shell Programming and Scripting
I have the following code :
function1 ()
{
print "January"
}
function2()
{
case $1 in
January)
print "Dzisiaj mamy styczen"
;;
*)
;;
}
main()
{ (1 Reply)
Discussion started by: presul
1 Replies
8. UNIX for Dummies Questions & Answers
I have the following code for installing a BSD application stack:
#!/bin/sh
# install dos2unix and unix2dos utilities
echo `date "+%Y-%m-%d %H:%M:%S"` "unix2dos and dos2unix: installing..." >> ~/post_install.log
pkg_add -r unix2dos
# install xfce4 desktop environment
echo `date "+%Y-%m-%d... (3 Replies)
Discussion started by: figaro
3 Replies
9. Shell Programming and Scripting
Hello all...
I'd like to create a variable from an array element from two arrays. In my search for answers I found this code for bash that joins two arrays and then started to work with it. I had got to work once and then foolishly without saving the code, I started to edit it for ksh and... (4 Replies)
Discussion started by: carlos25
4 Replies
10. Shell Programming and Scripting
I need to create arrays like this:
cnt=0
{ while read myline; do
if ];then
firstpass="${myline##<meas>}"
meas="${firstpass%%</meas>}"
tempmeas="${meas%%;*}"
MEAS$cnt=$tempmeas
print $cnt
print ${MEAS'$cnt'}
... (2 Replies)
Discussion started by: ajgwin
2 Replies