Search Results

Search: Posts Made By: 1988PF
2,197
Posted By 1988PF
Write a shell program with input
Hi,

Here is my question:

I want a shell script which I name as 'del', and can be used as del(string).

when run del(string), it will delete several directories at different locations in my...
29,820
Posted By 1988PF
could you also explain a little bit about this...
could you also explain a little bit about this line? Thanks!
29,820
Posted By 1988PF
Thanks. Could you explain a little bit about this...
Thanks. Could you explain a little bit about this line
tmp=$(echo "$fname" | awk -F '_' '{print $4}' )
29,820
Posted By 1988PF
extract string from file name between two underscores
Hi,

Here is my question,

I need to extract string between two underscores from the filename

for example, filename is

atmos_8xdaily_instant_300x300_1_12.nc

what I want to extract is...
1,927
Posted By 1988PF
extract every filename containing certain string in a directory and do some commend per file
Hi,

Here is my question: suppose I have files like
1990_8xdaily_atmos.nc
1991_8xdaily_atmos.nc
1992_8xdaily_atmos.nc
1993_8xdaily_atmos.nc
1990_daily_atmos.nc
1991_daily_atmos.nc...
57,102
Posted By 1988PF
cannot pass a echo output to a variable in bash
Hi,

I have a problem with passing a echo output into a variable in bash

file='1990.tar'
NAME='echo $file | cut -d '.' -f1';
echo $NAME


the result is
echo $file | cut -d . -f1

...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy