10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Good morning all,
This is the file name in question OD_Orders_2019-02-19.csv
I am trying to create a bash script to read into files with yesterdays date on the file name while retaining the rest of the files name. I would like for $y to equal, the name of the file with a formula output with... (2 Replies)
Discussion started by: Ibrahim A
2 Replies
2. Shell Programming and Scripting
Hi,
I would like use the output of my cut command as a variable in my following awk command. Here's what I've written.
cut -f1 info.txt | awk -v i=xargs -F'' '{if($6 == $i) print $20}' summary.txt
Where obviously the 'xargs' doesn't do what I want. How can I pass my cut result to my awk... (3 Replies)
Discussion started by: heyooo
3 Replies
3. UNIX for Beginners Questions & Answers
ldapsearch -x -LLL -E pr=200/noprompt -h abc-loc.somecompany.com -D "account@somecompany.com" -w password -b "cn=groupname,ou=Resource,ou=groups,dc=abc,dc=somecompany,dc=com" | grep member
Results are:
member: CN=Hanson\, Joe,OU=End Users,OU=Accounts,DC=abc,DC=somecompany,DC=com
member:... (3 Replies)
Discussion started by: who10
3 Replies
4. Shell Programming and Scripting
Hi,
My aim is to get the md5 hash of a file and store it in a variable.
var1="md5sum file1"
$var1
The above outputs fine but also contains the filename, so somthing like this 243ASsf25 file1
i just need to get the first part and put it into a variable.
var1="md5sum file1"... (5 Replies)
Discussion started by: JustALol
5 Replies
5. Shell Programming and Scripting
hi,
i want to remove 12 and 13 column from psv files and dump them in new folder
ls -ltr *GTDA_Dly_Pmix_*.psv>filename.xls
var1=`cat filename.xls`
for i in $var1
do
var3=`echo "$i" |cut -d '|' -f12,13 |sort -u`
sed -e 's/"|$var3"//g... (2 Replies)
Discussion started by: renuk
2 Replies
6. Shell Programming and Scripting
I have a file that i want to take only the first part of it and discard the rest, to be accurate,I need the first 137097 lines but I cant use split because I dont have enough space on my disck. I need sth to cut the file in its place (3 Replies)
Discussion started by: Heidi Heweidy
3 Replies
7. Shell Programming and Scripting
Hi,
In an effort to collect all my .java-files and place them in a LaTeXfile (using the listings environment of latex), i tried to use ex.
So what i have now is:
find . -name "*\.java" > latex
ex latex <<HERE
%s/\(.*\)/\\lstinputlisting{\1}
wq
HERE
So i try to escape the '\' with... (1 Reply)
Discussion started by: HannesBBR
1 Replies
8. Shell Programming and Scripting
If i wanted to extract the number of collisions from the eth0 section of the ifconfig file and have the output placed in a variable how would i do this?
I can get the output displayed using:
/sbin/ifconfig eth0 | grep "collisions"
What command would i now use to place the output in a... (1 Reply)
Discussion started by: warlock129
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am new to UNIX Scripting. I have been trying to use the CUT command to retrieve part of the header from a file and assign it to a variable. I have tried searching a lot, but I am still unsuccessful.
Sample Header: HJAN BALANCE 20090616
I need to retrieve the date here, which always... (10 Replies)
Discussion started by: ragz_82
10 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Hi, I run the command:
hostname to get the host back from the server: db201
Now, I need to take that result and set it to a variable. Can anyone help me with this?? I need to be able to use the same script on multiple servers so I do not want to hardcode the hostname result into... (1 Reply)
Discussion started by: stky13
1 Replies