10 More Discussions You Might Find Interesting
1. 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
2. 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
3. UNIX for Dummies Questions & Answers
Hi I have a text file with 2 values and I am trying to assign each value to a variable and then write those to text files.
So if the textfile is data.txt with 2 values x and y
I want to assign mean=x, and stdev=y and then write these out in text files alongwith the id ($id has already been... (6 Replies)
Discussion started by: violin
6 Replies
4. 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
5. Shell Programming and Scripting
Hi,
I have the files in the following files in a folder
19996587342
19487656550
19534838736
And i need to get the first 6 characters from the abvoe files
so i used the following script
#!/bin/ksh
for i in 19*
do
txt= `$i | cut -c -6`
echo "$txt"
done
The error is at... (4 Replies)
Discussion started by: smile689
4 Replies
6. UNIX for Dummies Questions & Answers
Version Info
+++++++++++++++
RHEL 5.4
Since ls command lists file sizes in Bytes which can be long I use du command like below.
I have run the du command for the below files as shown below.
But I want pipe this output to ls command just to see the modified timestamp for these files. ... (7 Replies)
Discussion started by: kraljic
7 Replies
7. Shell Programming and Scripting
Hello,
I'm pretty stumped, and I don't know why I am not able to redirect the output to the 'graphme' file with the command below in Fedora 18.
tcpdump -l -n -t "tcp == 18" | perl -ane '($s,$j)=split(/,/,$F,2); print "$s\n";' > graphme
In case you're wondering, I was following the example... (2 Replies)
Discussion started by: ConcealedKnight
2 Replies
8. Shell Programming and Scripting
I have an encrypted password file, and I've created a simple script to search the password file for a particular record. There are multiple lines per record, so I'm using a record delimiter.
#!/bin/bash
PATTERN=$1
openssl des3 -d -salt -in ~/docs/pass.des3 | awk '{ FS="\n" ; RS="*" }... (2 Replies)
Discussion started by: 0rac1e
2 Replies
9. Shell Programming and Scripting
Hi All,
Hope someone can advise here as I have been struggling to find a syntax that works here. I have tried a stack of combination I have seed in the forums but I think because I have needed to use "" and `` in the statments another method is found.
I am reading in lines with the following... (1 Reply)
Discussion started by: nkwilliams
1 Replies
10. UNIX for Dummies Questions & Answers
I am on a Linux system using bash shell.
I only want to see the number in the Use% field as the output.
#df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/dasda1 2.3G 2.1G 51M 98% /
!#/bin/bash
df -h / | awk '{print $5}' | cut -c1-2
Us
98
How do... (2 Replies)
Discussion started by: darthur
2 Replies