10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
i have a csv file like:
USERID;COG;DESCR;FIL;OFF
user001;user;test1;001;A01
user002;user;test2;002;A02
user0003;user;test3;003;A03
user004;user;test4;004;A04
user0005;user;test5;005;A05
etc..
I need to read line for line and, if value of first column is > 7 char (in this example... (4 Replies)
Discussion started by: kamose
4 Replies
2. Shell Programming and Scripting
Hi!
I m newbie for scripting. My requirement is to create a host file as below from the output of aws api.
Hostname PrivateIP abc x.y.x.z
cde a.b.c.c
and so on.
I have the following script,
#!/bin/bash
export AWS_ACCESS_KEY=abc
export... (5 Replies)
Discussion started by: cuteboyucsc
5 Replies
3. Shell Programming and Scripting
Hello,
I want to check the value of all MySQL columns.(column name is "status") via bash script.
If value is "0" at I want to make only single column value to "1"
I have many "0" values on mysql database(on "status" column)
"0" means it is a draft post. I want to publish a post. I... (2 Replies)
Discussion started by: tara123
2 Replies
4. Shell Programming and Scripting
Hi all,
I have two files with the following format:
file1
BBB;33
AAA;2
CCC;5
file2
5;.;.;.
33;.;.;.
The first file contain a list of code and numbers. The second file only the number.
I would like to replace the corresponding code in the first column of the file1 with the... (3 Replies)
Discussion started by: g256
3 Replies
5. Shell Programming and Scripting
I would like to setup a script that pulls in time/date in two seperate columns, and then name the other columns as listed below:
Column1=Art/TJ output
Column2=Art/TJ output
Column3=TJ output
column4=Art output
Column5=If time/date past 12:00 noon -fail
Colume6=If time/date before... (1 Reply)
Discussion started by: walnutpony123
1 Replies
6. Shell Programming and Scripting
Hi,
I've got a file with 3 columns which ends like this:
...
1234 345 1400
5287 733 1400
8472 874 1400
9317 726 1400
I want to replace the last row of the last column with the value 0. So my new file will end:
...
1234 345 1400
5287 733 1400
8472 874 1400
9317 726 ... (5 Replies)
Discussion started by: jhunter87
5 Replies
7. Shell Programming and Scripting
Input:
MD5(secret.txt)= fe66cbf9d929934b09cc7e8be890522e
MD5(secret2.txt)= asd123qwlkjgre5ug8je7hlt488dkr0p
I want the results to look like these, respectively:
MD5(secret.txt)= fe66cbf9 d929934b 09cc7e8b e890522e
MD5(secret2.txt)= asd123qw lkjgre5u g8je7hlt 488dkr0p
Basically, keeping... (11 Replies)
Discussion started by: teiji
11 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I've been trying to replace the numbers in the first column of my text file with all ones, unless the number is equal to 8. I have this:
1 1 11 123 258
2 1 9 135 175
1 1 15 143 274
8 1 13 153 172
8 1 13 154 166
8 1 13 154 167
3 1 15 237 255
4 1 15 243 202
1 1 13 133 166... (4 Replies)
Discussion started by: goodbenito
4 Replies
9. Shell Programming and Scripting
Hi All,
I have the same problem as the one posted in
https://www.unix.com/shell-programming-scripting/96097-how-read-value-specific-line-column-csh-variable.html
but I'm using bash.
Can anyone tell me how I have to modify the code to make it bash compatible?
eval `awk 'NR==3{print "set... (5 Replies)
Discussion started by: f_o_555
5 Replies
10. Shell Programming and Scripting
Hi
I have a file with just one column, and i'd like to save it in a bash array.
file_in
then, i want save the column in a bash array in order to get:
array==word1, array==word2....array==word4
I can't figure out how to do it. Can anyone help please?
thanks
D
EDIT: Sorry, i... (4 Replies)
Discussion started by: Dedalus
4 Replies