I want to type only the filename of a gcc source that has ".syn" as an extension and copy it, changing the extension to ".c" so it can be compiled.
I do it as follows:
This works fine, but if I want to repeat the compilation by recovering the previous call using history, the full filename plus the extension ".syn" appears and I have to delete the ".syn" to use my script.
Because so many programs give one an option of typing a filename with or without an ext, there must be a simple way to do this. How is it done?
Hi ,
I need to replace the file name extension with txt to csv,i wrote the below script when executing its giving the below error.Please anyone how to do this?
$ a2.sh
mv: *.: cannot access: No such file or directory
./a2.sh: o: bad number
$ vi a2.sh
a2.sh
-----
#!/bin/ksh
txt=$1... (4 Replies)
Hey,
I'm having a problem finding out if a directory holds any files with a certain file extension, for example .txt.
I have tried: if (! -e "*.txt")
and I've tried: set FILES=`ls *`
echo "Found $FILES"
foreach FILE ($FILES)
if($FILE == "*.txt")
And neither of... (2 Replies)
I have a list of files in a particular folder
Example:
File name - sample.F1.test
I want to change the extension of the above file to .csv
The final file should be renamed as sample.csv (4 Replies)
Hello guys,
I want to use an alias as an sub function in the script. Here is my issue:
I want to use
exsit_en <pattern> <file>
to indicate that if the <file> contains <pattern> the expression returns 1, and vice versa.
But in the alias I used as follows, the $status alway is 0. Can someone... (3 Replies)
Hi All,
i need to change the filename extension. For simplicity, we can assume that the extension after '.' is 3 characters only... but the filenames can vary.
eg. changing from abc.doc to abc.dxs
can i have a oneline command to achieve this (3 Replies)
Hello, everyone! :]
I'm having an issue with my camera/uploading to Photobucket.
When my camera transfers it's photos to my hard drive, it transfers them as .JPG. Unfortunately, when I go to upload to my Photobucket account, it only accepts .jpg & .jpeg files. Every time I want to upload, I... (6 Replies)
Hi All
I have a csh shell script which should check if a given file is a zip file as below:
****************************************
#!/bin/csh -f
if ]; then
echo is a zip file
else
echo sorry not a zip file
endif
exit
****************************************
... (1 Reply)
Hello all,
I need to change file extension for all .doc files to .txt file in multiple folders. I know the way to rename them by going to each folder and doing that, but I need something which I can run from home directory so that It does the renaming in all the nested directories.
Thanks. (4 Replies)
I have a file name
n10-z30-dsr65-ndelt1.00-varp0.08-16x12drw-csq-msf.ps
and I want to remove the varp info tag to get
n10-z30-dsr65-ndelt1.00-16x12drw-csq-msf.ps
Trying to use tr, but when I tried replacing varp with ooo I am getting the results below:
echo... (2 Replies)
Hi I have a list of files :root@L28mustang:/var/log/exim4/2017/Jul2017_Blast_BC07# ls -lrt | grep mainlog
-rw-r----- 1 Debian-exim adm 3636932 Jul 8 06:25 mainlog.3.gz
-rw-r----- 1 Debian-exim adm 919512 Jul 9 06:27 mainlog.2.gz
-rw-r----- 1 Debian-exim adm 7655054 Jul 10 06:25 mainlog.1... (1 Reply)
Discussion started by: anaigini45
1 Replies
LEARN ABOUT OPENDARWIN
kextstat
KEXTSTAT(8) BSD System Manager's Manual KEXTSTAT(8)NAME
kextstat -- display status of dynamically loaded kernel extensions
SYNOPSIS
kextstat [-b kext_bundle_id] [-k] [-l]
DESCRIPTION
The kextstat utility displays the status of any kernel extensions currently loaded in the kernel. The following information is shown for
each loaded kernel extension:
Index The load index of the kernel extension (used to track references). Gaps in the list indicate kernel extensions that have been
unloaded.
Refs The number of references to this extension by others. If nonzero, the extension cannot be unloaded.
Address The address in kernel space where the extension has been loaded.
Size The number of bytes of kernel memory that the extension occupies. If this is zero, the extension is actually a built-in part of
the kernel that has a record as an extension for resolving dependencies among extensions.
Wired The number of wired bytes of kernel memory that the extension occupies.
Name The CFBundleIdentifier of the kernel extension.
(Version)
The CFBundleVersion of the kernel extension.
<Linked Against>
The index numbers of all other kernel extensions that this extension has a reference to.
The following options are available:
-b kext_bundle_id
Display the status of only the kernel extension with the given bundle identifier. This option trumps the -k option; if both are
given and a kernel component is specified, its information is shown.
-k Don't show information for built-in components of the kernel.
-l Print the list of loaded kexts only and omit the header (useful for running output through text-analysis tools).
DIAGNOSTICS
The kextstat utility exits with a status of 0 on success and with a nonzero status if an error occurs.
SEE ALSO kextcache(8), kextd(8), kextload(8), kextunload(8)HISTORY
The kextstat command is based on the command kldstat written by Doug Rabson <dfr@FreeBSD.org>
Darwin April 17, 2002 Darwin