#!/bin/bash
BACKUP_DIR=/home/userx/backups/evolution
echo $BACKUP_DIR
# delete the first character from the string
BACKUP_DIR=$(echo $BACKUP_DIR | cut -c 2-)
echo $BACKUP_DIR
It works. It does want I want, delete the first character from string in the variable.
My questions, could this be done in another way (more "sophisticated")?
Hi posix, imho that is not an improvement to the OP's solution with cut. Radoulov's solution is elegant in that it does not need a pipe or an external program, nor a subshell plus it works in any POSIX compliant shell. I don't think it can be beat...
@Scrutinizer- You are right code written by Scrutinizer is much more improvement one than me, i really appreciate it. Also i learnt a lot more things form this forum.
Thanks a lot to all moderator, author and staff.