10 More Discussions You Might Find Interesting
1. Debian
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
2. Shell Programming and Scripting
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)
Discussion started by: kristinu
2 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: jaysean
4 Replies
4. Shell Programming and Scripting
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)
Discussion started by: raj144
1 Replies
5. UNIX for Dummies Questions & Answers
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)
Discussion started by: spidydude
6 Replies
6. Shell Programming and Scripting
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)
Discussion started by: Hiso
3 Replies
7. Shell Programming and Scripting
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)
Discussion started by: tpltp
3 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: mazhar803
4 Replies
9. Shell Programming and Scripting
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)
Discussion started by: amnesiaiom
2 Replies
10. Shell Programming and Scripting
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)
Discussion started by: mohan705
4 Replies