01-04-2013
Smart way of removing the text
this works ok if text is at the start of the field.
But I do suggest use
$() instead of
``, more easy to read.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need a help with cut/awk command. I need to get certain values from a string provided. For example: i have a config file with below mentioned details
oracle="user=name"/"pass/word"@databasename.
I have used a command var1=`grep -w oracle sample.cfg | cut -d"=" -f2 | cut -d"/" -f1`.
... (10 Replies)
Discussion started by: kumars2102
10 Replies
3. Shell Programming and Scripting
Hi
i read data with awk,
01.07.2012 00:10 227.72 247.50 1.227 1.727 17.273
01.07.2012 00:20 237.12 221.19 2.108 2.548 17.367
01.07.2012 00:30 230.38 230.34 3.216 3.755 17.412
01.07.2012 00:40 243.18 242.91 4.662 5.172 17.328
01.07.2012 00:50 245.58 245.41 5.179 5.721 17.128... (3 Replies)
Discussion started by: IMPe
3 Replies
4. Shell Programming and Scripting
Hi Friends,
I have a file1
i want to retrieve only the fields which have DEP,CITY,TRANS as headers in other file.
Output:
I want to give the input as DEP,CITY,TRANS column names to get the output.
i used cut command .. but if i have 300 fileds it is more difficult to... (4 Replies)
Discussion started by: i150371485
4 Replies
5. UNIX for Dummies Questions & Answers
hay
i am trying to get JUST the PID from the ps command.
my command line is:
ps -ef | grep "mintty" | cut -d' ' -f2
but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that.
i know i can use awk or cut... (8 Replies)
Discussion started by: ran ber
8 Replies
6. Shell Programming and Scripting
i am trying to cut the 4th field from the file.
sample file
a1,a2,"a,3",a4,a5,a6
b1,"b,2",b3,b4,b5,b6
c1,"c,2","c,3",c4,c5,c6
i need the output in the format of
a1,a2,"a,3",a5,a6
b1,"b,2",b3,b5,b6
c1,"c,2","c,3",c5,c6
i tried using cut -d, -f1-4,6-
but i am getting the output as ... (10 Replies)
Discussion started by: ATWC
10 Replies
7. 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
8. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
9. Shell Programming and Scripting
Hi Everyone,
I have a very simple problem and i am stuck in that from last 8 days. I tried many attempts, googled my query but all in vain.
I have a text file named "test.txt"
In that suppose i have contents like:
Java:
1 Object oriented programming language
2 Concepts of Abstraction... (5 Replies)
Discussion started by: Abhijeet Anand
5 Replies
10. 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
DPT(4) BSD Kernel Interfaces Manual DPT(4)
NAME
dpt -- DPT RAID Controller SCSI driver
SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file:
device scbus
device dpt
For one or more EISA cards:
device eisa
For one or more PCI cards:
device pci
To allow PCI adapters to use memory mapped I/O if enabled:
options DPT_ALLOW_MEMIO
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
dpt_load="YES"
DESCRIPTION
The dpt driver supports DPT RAID SCSI controllers.
SmartRAID (PM3???) are "Enterprise" class cards, and SmartCache (PM2???) cards are in the "Workstation" class. The Gen 4 Smart Cache IV
products were a re-issue of the Gen 3 utilizing upgraded (and cheaper to produce) silicon. The PM3334 (Smart RAID III) was not revamped as
there was no upgraded silicon (68040 processor) and it was using the best DPT made. Note there has been customer confusion over the faster
enterprise class card supported by this driver being an older generation. The Gen5 cards are supported by the asr(4) driver.
HARDWARE
The dpt driver provides support for the following RAID adapters:
o DPT Smart Cache Plus
o Smart Cache II (PM2?2?, PM2022 [EISA], PM2024/PM2124 [PCI]) (Gen2)
o Smart RAID II (PM3?2?, PM3021, PM3222)
o Smart Cache III (PM2?3?)
o Smart RAID III (PM3?3?, PM3332 [EISA], PM3334UW [PCI]) (Gen3)
o Smart Cache IV (PM2?4?, PM2042 [EISA], PM2044/PM2144 [PCI]) (Gen4)
o Smart RAID IV
SEE ALSO
asr(4), cd(4), ch(4), da(4), sa(4), scsi(4)
HISTORY
The dpt driver first appeared in FreeBSD 2.2.6.
AUTHORS
The dpt driver was written by Simon Shapiro and ported to the CAM SCSI system by Justin T. Gibbs.
BSD
November 13, 2014 BSD