9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Good morning all,
This is the file name in question OD_Orders_2019-02-19.csv
I am trying to create a bash script to read into files with yesterdays date on the file name while retaining the rest of the files name. I would like for $y to equal, the name of the file with a formula output with... (2 Replies)
Discussion started by: Ibrahim A
2 Replies
2. Shell Programming and Scripting
Hi,
I found this in a script and I would like to know how this works
Code is here:
# var1=PART1_PART2
# var2=${var1##*_}
# echo $var2
PART2
I'm wondering how ##* makes the Shell to understand to pick up the last value from the given. (2 Replies)
Discussion started by: sathyaonnuix
2 Replies
3. Red Hat
Good day every one.
When a use df -h comand on my read hat linux server i get something like this:
/dev/mapper/Vg02-Lv19 30G 29G 145M 100% /app
Then when i do du -sh /app/
i get
12G /app/
For me it is meaning that only 12G was used on /app partition.
How can i see where are... (9 Replies)
Discussion started by: cgege
9 Replies
4. Shell Programming and Scripting
Hello ,
When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies
5. UNIX for Dummies Questions & Answers
Hi Gurus:
I am trying to understand the following line of code.I did enough of googling to understand but no luck.Please help me understand the follow chunk of code:
X=$0
MOD=${X%/*}/env.ksh
X is the current script from which I am trying to execute.
Say if X=test.ksh
$MOD is echoing :... (3 Replies)
Discussion started by: vemana
3 Replies
6. Shell Programming and Scripting
I just started shell coding and I'm a bit confused on how 'mv' works can someone explain to me how it works and if i did this correctly. Thanks.
echo "Enter Name of the first file:"
read file1
#echo $file1
if ; then
echo "Sorry, file does not exist."
exit 1
... (16 Replies)
Discussion started by: taiL
16 Replies
7. Filesystems, Disks and Memory
I'm curious about the behavior where any udev labeled device causes that corresponding listing to disappear from fdisk, sfdisk, or in the case of RDAC, lsvdev.
I have seen this on both EMC clariion and Sun Storagetek/Engenio 6540 arrays.
We use RHEL5.1 and udev to create persistent labels for... (2 Replies)
Discussion started by: Radar
2 Replies
8. Shell Programming and Scripting
In our old code, we have the below statements
LAST_FRIDAY=2009-01-16
echo $LAST_FRIDAY|cut -d '"' -f2
And the output of this is 2009-01-16
The delimiter provided in cut statement is not used in the variable. Also, when we give f1 or f3 or f10 or any other field instead of f2, we still... (3 Replies)
Discussion started by: krishmaths
3 Replies
9. Shell Programming and Scripting
Hi guys,
I want to write a script to automate partitioning for some project that I'm working on. I tried using fdisk but it was too painful... so, turned to sfdisk but now I'm getting strange results...or at least I think so.
What I want to do is, to get the disk size to be created from... (0 Replies)
Discussion started by: alirezan
0 Replies